77 #include <stm32f4xx.h>
81 #define CARME_I2C_BOARD I2C2
82 #define CARME_I2C_AUDIO I2C3
84 #define CARME_I2C_SPEED 100000
85 #define CARME_I2C_ADDR_BOARD 0xA0
87 #define CARME_I2C_ADDR_AUDIO 0x33
90 #define CARME_ERROR_I2C_TIMEOUT CARME_ERROR_I2C_BASE + 0
97 uint8_t twoByte, uint8_t *pdata, uint16_t count);
99 uint8_t twoByte, uint8_t *pdata, uint16_t count);
uint8_t ERROR_CODES
Error variable.
ERROR_CODES CARME_I2C_Read(I2C_TypeDef *I2Cx, uint8_t addr, uint16_t reg, uint8_t twoByte, uint8_t *pdata, uint16_t count)
Read data from an I2C slave device on a specific register address.
void CARME_I2C_Init(I2C_TypeDef *I2Cx)
I2C initialization.
ERROR_CODES CARME_I2C_Write(I2C_TypeDef *I2Cx, uint8_t addr, uint16_t reg, uint8_t twoByte, uint8_t *pdata, uint16_t count)
Write data to an I2C slave device on a specific register address.