Wirepas SDK
|
Go to the source code of this file.
Typedefs | |
typedef void(* | i2c_on_transfer_done_cb_f) (i2c_res_e res, i2c_xfer_t *xfer_p) |
Functions | |
i2c_res_e | I2C_init (i2c_conf_t *conf_p) |
Initialize I2C module. More... | |
i2c_res_e | I2C_close (void) |
Close an already initialized I2C module. More... | |
i2c_res_e | I2C_transfer (i2c_xfer_t *xfer_p, i2c_on_transfer_done_cb_f cb) |
Initiate an I2C transfer In case there is a write followed by a read, the read is initiated by a REPEATED START. Transfer must be finished before starting a new one. More... | |
i2c_res_e | I2C_status (void) |
Return the status of the I2C driver. More... | |
Data Structures | |
struct | i2c_conf_t |
Simple minimal I2C master driver It only manages one I2C instance at a time. More... | |
struct | i2c_xfer_t |
typedef void(* i2c_on_transfer_done_cb_f) (i2c_res_e res, i2c_xfer_t *xfer_p) |
i2c_res_e I2C_close | ( | void | ) |
Close an already initialized I2C module.
i2c_res_e I2C_init | ( | i2c_conf_t * | conf_p | ) |
Initialize I2C module.
conf_p | Pointer to an i2c configuration |
i2c_res_e I2C_status | ( | void | ) |
Return the status of the I2C driver.
i2c_res_e I2C_transfer | ( | i2c_xfer_t * | xfer_p, |
i2c_on_transfer_done_cb_f | cb | ||
) |
Initiate an I2C transfer In case there is a write followed by a read, the read is initiated by a REPEATED START. Transfer must be finished before starting a new one.
xfer_p | Pointer to the transfer description |
cb | Callback to call at end of transfer (Can be NULL for a blocking call) |
struct i2c_conf_t |
struct i2c_xfer_t |