#include <i2c.h>
|
bool | check_busy () |
|
void | handle_error () |
|
void | handle_event () |
|
void | hardware_failure () |
|
void | init (const i2c_hardware_struct_t *c) |
|
uint16_t | num_errors () |
|
int8_t | read (uint8_t addr, uint8_t reg, uint8_t num_bytes, uint8_t *data, void(*callback)(uint8_t)=nullptr, bool blocking=false) |
|
int8_t | read (uint8_t addr, uint8_t reg, uint8_t *data) |
|
void | transfer_complete_cb () |
|
void | unstick () |
|
int8_t | write (uint8_t addr, uint8_t reg, uint8_t data, void(*callback)(uint8_t), bool blocking=false) |
|
int8_t | write (uint8_t addr, uint8_t reg, uint8_t data) |
|
|
enum | {
SB = 0x0001,
ADDR = 0x0002,
BTF = 0x0004,
ADD10 = 0x0008,
STOPF = 0x0010,
RES1 = 0x0020,
RXNE = 0x0040,
TXE = 0x0080,
BERR = 0x0100,
ARLO = 0x0200,
AF = 0x0400,
OVR = 0x0800,
PEC_ERR = 0x1000,
RES2 = 0x2000,
TIMEOUT = 0x4000,
SMB_ALERT = 0x8000,
MSL = 0x1 << 16,
BUSY = 0x2 << 16,
TRA = 0x4 << 16,
RES3 = 0x8 << 16,
GEN_CALL = 0x10 << 16,
SMBDE_FAULT = 0x20 << 16,
DUALF = 0x40 << 16
} |
|
enum | current_status_t { IDLE,
READING,
WRITING
} |
|
Definition at line 40 of file i2c.h.
Enumerator |
---|
SB |
|
ADDR |
|
BTF |
|
ADD10 |
|
STOPF |
|
RES1 |
|
RXNE |
|
TXE |
|
BERR |
|
ARLO |
|
AF |
|
OVR |
|
PEC_ERR |
|
RES2 |
|
TIMEOUT |
|
SMB_ALERT |
|
MSL |
|
BUSY |
|
TRA |
|
RES3 |
|
GEN_CALL |
|
SMBDE_FAULT |
|
DUALF |
|
Definition at line 45 of file i2c.h.
Enumerator |
---|
RESULT_ERROR |
|
RESULT_SUCCESS |
|
RESULT_BUSY |
|
Definition at line 105 of file i2c.h.
Enumerator |
---|
IDLE |
|
READING |
|
WRITING |
|
Definition at line 76 of file i2c.h.
void I2C::handle_error |
( |
| ) |
|
void I2C::handle_event |
( |
| ) |
|
void I2C::handle_hardware_failure |
( |
| ) |
|
|
private |
void I2C::hardware_failure |
( |
| ) |
|
uint16_t I2C::num_errors |
( |
| ) |
|
|
inline |
int8_t I2C::read |
( |
uint8_t |
addr, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
num_bytes, |
|
|
uint8_t * |
data, |
|
|
void(*)(uint8_t) |
callback = nullptr , |
|
|
bool |
blocking = false |
|
) |
| |
int8_t I2C::read |
( |
uint8_t |
addr, |
|
|
uint8_t |
reg, |
|
|
uint8_t * |
data |
|
) |
| |
void I2C::transfer_complete_cb |
( |
| ) |
|
int8_t I2C::write |
( |
uint8_t |
addr, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
data, |
|
|
void(*)(uint8_t) |
callback, |
|
|
bool |
blocking = false |
|
) |
| |
int8_t I2C::write |
( |
uint8_t |
addr, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
data |
|
) |
| |
volatile uint8_t I2C::addr_ |
|
private |
Definition at line 94 of file i2c.h.
void(* I2C::cb_) (uint8_t) |
Definition at line 89 of file i2c.h.
volatile uint8_t I2C::data_ |
|
private |
Definition at line 97 of file i2c.h.
Definition at line 99 of file i2c.h.
Definition at line 92 of file i2c.h.
uint16_t I2C::error_count_ = 0 |
|
private |
Definition at line 86 of file i2c.h.
uint64_t I2C::last_event_us_ |
volatile uint8_t I2C::len_ |
|
private |
Definition at line 96 of file i2c.h.
volatile uint8_t I2C::reg_ |
|
private |
Definition at line 95 of file i2c.h.
volatile uint8_t I2C::return_code_ |
|
private |
Definition at line 90 of file i2c.h.
Definition at line 83 of file i2c.h.
Definition at line 84 of file i2c.h.
bool I2C::subaddress_sent_ = false |
|
private |
Definition at line 91 of file i2c.h.
The documentation for this class was generated from the following files: