summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc313x
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/lpc313x')
-rw-r--r--nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c5
-rwxr-xr-xnuttx/arch/arm/src/lpc313x/lpc313x_memorymap.h2
2 files changed, 5 insertions, 2 deletions
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"