![]() |
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. | |
i2c_res_e | I2C_close (void) |
Close an already initialized I2C module. | |
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. | |
i2c_res_e | I2C_status (void) |
Return the status of the I2C driver. | |
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 |
Enumerations | |
enum | i2c_res_e { I2C_RES_OK , I2C_RES_INVALID_CONFIG , I2C_RES_INVALID_XFER , I2C_RES_NOT_INITIALIZED , I2C_RES_ALREADY_INITIALIZED , I2C_RES_BUSY , I2C_RES_ANACK , I2C_RES_DNACK , I2C_RES_BUS_HANG } |
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 |