diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-26 21:28:14 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-26 21:28:14 +0000 |
commit | d0397838aeed91201230290ec052fe2f94840b56 (patch) | |
tree | 36ea2f9a52f0640eae872ff2c79b065d8388f0e4 /os | |
parent | 44578159320d9d9bf89e8ac3b4d21635e8a45f10 (diff) | |
download | ChibiOS-d0397838aeed91201230290ec052fe2f94840b56.tar.gz ChibiOS-d0397838aeed91201230290ec052fe2f94840b56.tar.bz2 ChibiOS-d0397838aeed91201230290ec052fe2f94840b56.zip |
I2C. Small bugfix.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@2844 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/include/i2c.h | 4 | ||||
-rw-r--r-- | os/hal/platforms/STM32/i2c_lld.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h index c2f717432..53f4cd86a 100644 --- a/os/hal/include/i2c.h +++ b/os/hal/include/i2c.h @@ -116,6 +116,7 @@ typedef uint8_t i2cblock_t; /**
* @brief Structure representing an I2C slave configuration.
+ * @details TODO: write about befers
*/
struct I2CSlaveConfig{
/**
@@ -133,6 +134,9 @@ struct I2CSlaveConfig{ */
i2cerrorcallback_t id_err_callback;
+ /**
+ * @brief Pointer to input buffer.
+ */
i2cblock_t *rxbuf; // pointer to buffer
size_t rxdepth; // depth of buffer
size_t rxbytes; // count of bytes to sent in one transmission
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c index cb75b6da2..804246b2d 100644 --- a/os/hal/platforms/STM32/i2c_lld.c +++ b/os/hal/platforms/STM32/i2c_lld.c @@ -297,8 +297,8 @@ void i2c_lld_start(I2CDriver *i2cp) { #endif #if STM32_I2C_USE_I2C2 if (&I2CD2 == i2cp) { - NVICEnableVector(I2C2_EV_IRQn, STM32_I2C2_IRQ_PRIORITY); - NVICEnableVector(I2C2_ER_IRQn, STM32_I2C2_IRQ_PRIORITY); + NVICEnableVector(I2C2_EV_IRQn, STM32_I2C_I2C2_IRQ_PRIORITY); + NVICEnableVector(I2C2_ER_IRQn, STM32_I2C_I2C2_IRQ_PRIORITY); RCC->APB1ENR |= RCC_APB1ENR_I2C2EN; // I2C 2 clock enable } #endif |