I2C. Small bugfix.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@2844 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
4457815932
commit
d0397838ae
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue