From 3d3e234c567d560758a05fbaa9e0e6e0828d80ba Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Jul 2010 12:15:37 +0000 Subject: Fix some CodeSourcery compile errors git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2816 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c | 5 ++++- nuttx/arch/arm/src/lpc313x/lpc313x_memorymap.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'nuttx/arch/arm/src/lpc313x') diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c b/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c index 0d03390c2..137b2b315 100644 --- a/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c +++ b/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c @@ -242,6 +242,9 @@ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) putreg32 (((50 * freq) / 100) / frequency, priv->base + LPC313X_I2C_CLKLO_OFFSET); putreg32 (((50 * freq) / 100) / frequency, priv->base + LPC313X_I2C_CLKHI_OFFSET); } + + /* FIXME: This function should return the actual selected frequency */ + return frequency; } /******************************************************************************* @@ -280,7 +283,7 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int bufle DEBUGASSERT (dev != NULL); priv->msg.flags &= ~I2C_M_READ; - priv->msg.buffer = buffer; + priv->msg.buffer = (uint8_t*)buffer; priv->msg.length = buflen; ret = i2c_transfer (dev, &priv->msg, 1); diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_memorymap.h b/nuttx/arch/arm/src/lpc313x/lpc313x_memorymap.h index 4401a3df0..4889f486a 100755 --- a/nuttx/arch/arm/src/lpc313x/lpc313x_memorymap.h +++ b/nuttx/arch/arm/src/lpc313x/lpc313x_memorymap.h @@ -135,7 +135,7 @@ #if defined(CONFIG_ARCH_CHIP_LPC3131) # define LPC313X_ISRAM_SIZE (LPC313X_INTSRAM0_SIZE+LPC313X_INTSRAM1_SIZE) -#elif defined() +#elif defined(CONFIG_ARCH_CHIP_LPC3130) # define LPC313X_ISRAM_SIZE LPC313X_INTSRAM0_SIZE #else # error "Unsupported LPC313X architecture" -- cgit v1.2.3