38#ifndef STM32F401RE_I2C_H__
39#define STM32F401RE_I2C_H__
Common utility module public API.
EN_STATUS_te
Represents an enabled or disabled state.
void i2c_deinit(I2C_REGDEF_ts const *i2c_instance)
Deinitializes the I2C peripheral and disables its clock.
void i2c_init(I2C_CFG_ts *i2c_cfg)
Initializes the I2C peripheral with the given configuration.
void i2c_get_name(I2C_REGDEF_ts const *i2c_instance, char *name)
Returns the name string of an I2C peripheral instance (e.g. "I2C1").
void i2c_master_send_continue(I2C_REGDEF_ts *i2c_instance, uint8_t *tx_buffer, uint32_t len)
Continues a transmission started by i2c_master_send without a new START or address phase.
void i2c_master_set_comm(I2C_REGDEF_ts *i2c_instance, EN_STATUS_te en_status)
Enables or disables the I2C peripheral and controls bus ownership.
void i2c_master_receive(I2C_REGDEF_ts *i2c_instance, uint8_t slave_addr, uint8_t *rx_buffer, uint32_t len)
Blocking I2C master receive. Sends a start condition, address, and reads data.
void i2c_master_send(I2C_REGDEF_ts *i2c_instance, uint8_t slave_addr, uint8_t *tx_buffer, uint32_t len)
Blocking I2C master transmit. Sends a start condition, address, and data.
I2C_CLOCK_STRECH_te
I2C slave clock stretching enable/disable.
I2C_SPEED_te
I2C bus speed (SCL frequency).
I2C_ACK_te
I2C acknowledge control.
STM32F401RE MCU-specific peripheral register definitions and bit position enumerations.
Configuration structure for initializing an I2C peripheral.
I2C_CLOCK_STRECH_te clock_strech
I2C peripheral register map.