29#define I2C_TIMEOUT_MS 100U
31#define I2C_MAX_NUM_DATA 32U
126#ifdef MS_PLATFORM_X86
StatusCode i2c_write_reg(I2CPort i2c, I2CAddress addr, uint8_t reg, uint8_t *tx_data, size_t tx_len)
Writes data using the I2C port to the specified address and register.
Definition: i2c.c:276
uint8_t I2CAddress
I2C address type.
Definition: i2c.h:34
StatusCode i2c_read(I2CPort i2c, I2CAddress addr, uint8_t *rx_data, size_t rx_len)
Reads data using the I2C port from the specified address.
Definition: i2c.c:263
StatusCode i2c_init(I2CPort i2c, const I2CSettings *settings)
Initialize I2C instance.
Definition: i2c.c:194
I2CPort
I2C Port selection.
Definition: i2c.h:37
I2CSpeed
I2C speed type.
Definition: i2c.h:44
StatusCode i2c_read_reg(I2CPort i2c, I2CAddress addr, uint8_t reg, uint8_t *rx_data, size_t rx_len)
Reads data using the I2C port from the specified address and register.
Definition: i2c.c:271
StatusCode i2c_write(I2CPort i2c, I2CAddress addr, uint8_t *tx_data, size_t tx_len)
Writes data using the I2C port to the specified address.
Definition: i2c.c:267
@ I2C_PORT_1
Definition: i2c.h:38
@ I2C_PORT_2
Definition: i2c.h:39
@ NUM_I2C_PORTS
Definition: i2c.h:40
@ NUM_I2C_SPEEDS
Definition: i2c.h:47
@ I2C_SPEED_STANDARD
Definition: i2c.h:45
@ I2C_SPEED_FAST
Definition: i2c.h:46
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Port and pin data.
Definition: gpio.h:112
I2C settings struct.
Definition: i2c.h:55
GpioAddress scl
Definition: i2c.h:58
I2CSpeed speed
Definition: i2c.h:56
GpioAddress sda
Definition: i2c.h:57