|  | Paparazzi UAS v7.0_unstable
    Paparazzi is a free software Unmanned Aircraft System. | 
Architecture independent I2C (Inter-Integrated Circuit Bus) API. More...
 Include dependency graph for i2c.h:
 Include dependency graph for i2c.h:Go to the source code of this file.
| Data Structures | |
| struct | i2c_transaction | 
| I2C transaction structure.  More... | |
| struct | i2c_periph | 
| struct | i2c_errors | 
| I2C errors counter.  More... | |
| Macros | |
| #define | I2C_BUF_LEN 32 | 
| I2C buffer length. | |
| #define | I2C_TRANSACTION_QUEUE_LEN 8 | 
| I2C transaction queue length. | |
| #define | ZEROS_ERR_COUNTER(_i2c_err) | 
| Typedefs | |
| typedef bool | i2c_idle_fn_t(struct i2c_periph *p) | 
| typedef bool | i2c_submit_fn_t(struct i2c_periph *p, struct i2c_transaction *t) | 
| typedef void | i2c_setbitrate_fn_t(struct i2c_periph *p, int bitrate) | 
| typedef void | i2c_spin_fn_t(struct i2c_periph *p) | 
| Enumerations | |
| enum | I2CTransactionType { I2CTransTx , I2CTransRx , I2CTransTxRx } | 
| I2C transaction type.  More... | |
| enum | I2CTransactionStatus { I2CTransPending , I2CTransRunning , I2CTransSuccess , I2CTransFailed , I2CTransDone } | 
| I2C transaction status.  More... | |
| enum | I2CStatus { I2CIdle , I2CStartRequested , I2CAddrWrSent , I2CAddrRdSent , I2CSendingByte , I2CReadingByte , I2CReadingLastByte , I2CStopRequested , I2CRestartRequested , I2CComplete , I2CFailed } | 
| I2C peripheral status.  More... | |
| Functions | |
| void | i2c_init (struct i2c_periph *p) | 
| Initialize I2C peripheral. | |
| static bool | i2c_idle (struct i2c_periph *p) | 
| Check if I2C bus is idle. | |
| static bool | i2c_submit (struct i2c_periph *p, struct i2c_transaction *t) | 
| Submit a I2C transaction. | |
| static void | i2c_setbitrate (struct i2c_periph *p, int bitrate) | 
| Set I2C bitrate. | |
| void | i2c_event (void) | 
| i2c_event() function | |
| 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. | |
| enum I2CTransactionStatus | i2c_blocking_transmit (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len, float timeout) | 
| Submit a write only transaction and wait for it to complete. | |
| enum I2CTransactionStatus | i2c_blocking_receive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len, float timeout) | 
| Submit a read only transaction and wait for it to complete. | |
| enum I2CTransactionStatus | i2c_blocking_transceive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r, float timeout) | 
| Submit a write/read transaction and wait for it to complete. | |
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
Also see the I2C interface page.
Definition in file i2c.h.