![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Architecture independent I2C (Inter-Integrated Circuit Bus) API. More...
Go to the source code of this file.
Macros | |
#define | USE_I2C (USE_I2C0 || USE_I2C1 || USE_I2C2 || USE_I2C3 || USE_I2C4) |
#define | USE_SOFT_I2C (USE_SOFTI2C0 || USE_SOFTI2C1) |
#define | I2C_BLOCKING_TIMEOUT 1.f |
Default timeout for blocking I2C transactions. | |
Functions | |
void | i2c_init (struct i2c_periph *p) |
Initialize I2C peripheral. | |
bool | i2c_transmit (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len) |
Submit a write only transaction. | |
bool | i2c_receive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len) |
Submit a read only transaction. | |
bool | i2c_transceive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r) |
Submit a write/read transaction. | |
bool | i2c_blocking_transmit (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len) |
Submit a write only transaction and wait for it to complete. | |
bool | i2c_blocking_receive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len) |
Submit a read only transaction and wait for it to complete. | |
bool | i2c_blocking_transceive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r) |
Submit a write/read transaction and wait for it to complete. | |
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
Definition in file i2c.c.
#define USE_SOFT_I2C (USE_SOFTI2C0 || USE_SOFTI2C1) |