Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
i2c.c File Reference

Architecture independent I2C (Inter-Integrated Circuit Bus) API. More...

+ Include dependency graph for i2c.c:

Go to the source code of this file.

Macros

#define I2C_BLOCKING_TIMEOUT   1.f
 Default timeout for blocking I2C transactions. More...
 

Functions

static void send_i2c_err (struct transport_tx *trans, struct link_device *dev)
 
void i2c_init (struct i2c_periph *p)
 Initialize I2C peripheral. More...
 
bool i2c_transmit (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
 Submit a write only transaction. More...
 
bool i2c_receive (struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
 Submit a read only transaction. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Architecture independent I2C (Inter-Integrated Circuit Bus) API.

Definition in file i2c.c.

Macro Definition Documentation

#define I2C_BLOCKING_TIMEOUT   1.f

Default timeout for blocking I2C transactions.

Definition at line 356 of file i2c.c.

Referenced by i2c_blocking_receive(), i2c_blocking_transceive(), and i2c_blocking_transmit().

Function Documentation

static void send_i2c_err ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 261 of file i2c.c.

References dev, and i2c_periph::trans.

Referenced by i2c_init().

+ Here is the caller graph for this function: