Go to the documentation of this file.
47 #define I2C_MAX_BUS_NUMBER 4
147 uint8_t bytes_number,
153 uint8_t bytes_number,
162 #endif // _NO_OS_I2C_H_
Structure holding I2C bus descriptor.
Definition: no_os_i2c.h:81
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
uint8_t slave_address
Definition: no_os_i2c.h:70
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
void no_os_i2cbus_remove(uint32_t bus_number)
Removes i2c bus instance.
Definition: no_os_i2c.c:131
uint32_t device_id
Definition: no_os_i2c.h:105
void * extra
Definition: no_os_i2c.h:74
uint32_t max_speed_hz
Definition: no_os_i2c.h:89
uint8_t slave_address
Definition: no_os_i2c.h:109
int32_t no_os_i2cbus_init(const struct no_os_i2c_init_param *param)
Initialize the i2c bus communication peripheral.
Definition: no_os_i2c.c:86
uint32_t max_speed_hz
Definition: no_os_i2c.h:68
struct no_os_i2cbus_desc * bus
Definition: no_os_i2c.h:103
uint32_t max_speed_hz
Definition: no_os_i2c.h:107
const struct no_os_i2c_platform_ops * platform_ops
Definition: no_os_i2c.h:111
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
void * extra
Definition: no_os_i2c.h:93
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
uint32_t device_id
Definition: no_os_i2c.h:87
const struct no_os_i2c_platform_ops * platform_ops
Definition: no_os_i2c.h:91
void * mutex
Definition: no_os_i2c.h:83
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
uint8_t slave_number
Definition: no_os_i2c.h:85
const struct no_os_i2c_platform_ops * platform_ops
Definition: no_os_i2c.h:72
void * extra
Definition: no_os_i2c.h:113
uint32_t device_id
Definition: no_os_i2c.h:66