Classes | Macros | Typedefs | Enumerations | Functions
drv_i2c.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  i2cJob
 

Macros

#define I2C_BUFFER_SIZE   16
 

Typedefs

typedef enum I2CDevice I2CDevice
 
typedef struct i2cJob i2cJob_t
 

Enumerations

enum  {
  I2C_JOB_DEFAULT, I2C_JOB_QUEUED, I2C_JOB_BUSY, I2C_JOB_COMPLETE,
  I2C_JOB_ERROR
}
 
enum  I2CDevice { I2CDEV_1, I2CDEV_2, I2CDEV_MAX = I2CDEV_2 }
 
enum  i2cJobType_t { READ, WRITE }
 

Functions

void i2c_queue_job (i2cJobType_t type, uint8_t addr_, uint8_t reg_, uint8_t *data, uint8_t length, volatile uint8_t *status_, void(*CB)(uint8_t))
 
uint16_t i2cGetErrorCounter (void)
 
void i2cInit (I2CDevice index)
 
bool i2cRead (uint8_t addr_, uint8_t reg, uint8_t len, uint8_t *buf)
 
bool i2cWrite (uint8_t addr_, uint8_t reg, uint8_t data)
 
bool i2cWriteBuffer (uint8_t addr_, uint8_t reg_, uint8_t len_, uint8_t *data)
 

Macro Definition Documentation

#define I2C_BUFFER_SIZE   16

Definition at line 54 of file drv_i2c.h.

Typedef Documentation

typedef enum I2CDevice I2CDevice
typedef struct i2cJob i2cJob_t

Enumeration Type Documentation

anonymous enum
Enumerator
I2C_JOB_DEFAULT 
I2C_JOB_QUEUED 
I2C_JOB_BUSY 
I2C_JOB_COMPLETE 
I2C_JOB_ERROR 

Definition at line 35 of file drv_i2c.h.

enum I2CDevice
Enumerator
I2CDEV_1 
I2CDEV_2 
I2CDEV_MAX 

Definition at line 24 of file drv_i2c.h.

Enumerator
READ 
WRITE 

Definition at line 30 of file drv_i2c.h.

Function Documentation

void i2c_queue_job ( i2cJobType_t  type,
uint8_t  addr_,
uint8_t  reg_,
uint8_t *  data,
uint8_t  length,
volatile uint8_t *  status_,
void(*)(uint8_t)  CB 
)

Definition at line 579 of file drv_i2c.c.

uint16_t i2cGetErrorCounter ( void  )

Definition at line 467 of file drv_i2c.c.

void i2cInit ( I2CDevice  index)

Definition at line 420 of file drv_i2c.c.

bool i2cRead ( uint8_t  addr_,
uint8_t  reg,
uint8_t  len,
uint8_t *  buf 
)

Definition at line 157 of file drv_i2c.c.

bool i2cWrite ( uint8_t  addr_,
uint8_t  reg,
uint8_t  data 
)

Definition at line 152 of file drv_i2c.c.

bool i2cWriteBuffer ( uint8_t  addr_,
uint8_t  reg_,
uint8_t  len_,
uint8_t *  data 
)

Definition at line 113 of file drv_i2c.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:50