22 #ifndef SRC_PERIPHERALS_I2C_I2C_H_ 23 #define SRC_PERIPHERALS_I2C_I2C_H_ 30 I2C_STATUS_TIMEOUT = 1,
65 int32_t
I2C_read(uint8_t addr, uint8_t *data, uint8_t count);
75 int32_t
I2C_write(uint8_t addr,
const uint8_t* data, uint8_t count);
void I2C_enable(void)
Enable the I2C channel.
Definition: i2c.c:44
void I2C_mode_gpio_input(void)
Switch I2C pins to GPIO mode Disconnect SDA and SCL pins from the I2C peripheral. Configure them as G...
Definition: i2c.c:79
void I2C_write_recover(void)
Write FF (the recover value) to the I2C Bus.
Definition: i2c.c:326
I2C_status_t
Status values returned by the I2C read/write commands.
Definition: i2c.h:28
void I2C_disable(void)
Disable the I2C channel.
Definition: i2c.c:54
void I2C_mode_normal(void)
Connect SDA and SCL pins to the I2C peripheral.
Definition: i2c.c:60
void I2C_wait_transmit(void)
Wait for an I2C transmission to end.
Definition: i2c.c:311
void I2C_write_reset(void)
Write 00 (the reset value) to the I2C Bus.
Definition: i2c.c:339
void I2C_peripheral_recover(void) __attribute__((deprecated))
Recovery procedure according to XMC1100 Errata Sheet.
Definition: i2c.c:299
int32_t I2C_write(uint8_t addr, const uint8_t *data, uint8_t count)
Write a number of uint8_t bytes to an I2C device.
Definition: i2c.c:94
int32_t I2C_read(uint8_t addr, uint8_t *data, uint8_t count)
Read a number of bytes from an I2C device to a uint8_t array.
Definition: i2c.c:186
void I2C_init(void)
Initialize the I2C peripheral.
Definition: i2c.c:34