aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/include/i2c.h4
-rw-r--r--os/hal/platforms/STM32/i2c_lld.c4
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