#define I2C_CURRENT_RATE -1L
#define I2C_CURRENT_TIMEOUT
#define I2C_SLA_NONE -1
#define I2C_BF_INITIALIZED 0x01
See: | Type struct _NUTI2C_BUS |
See: | Type struct _NUTI2C_SLAVE |
See: | Type struct _NUTI2C_MSG |
struct _NUTI2C_MSG | |
{ | |
const uint8_t* msg_wdat; | |
int msg_wlen; | |
volatile int msg_widx; | |
uint8_t* msg_rdat; | |
int msg_rsiz; | |
volatile int msg_ridx; | |
} |
struct _NUTI2C_BUS | |
{ | |
void* bus_icb; | |
int (*bus_init)(NUTI2C_BUS*); | |
int (*bus_configure)(NUTI2C_BUS*); | |
int (*bus_probe)(NUTI2C_BUS*,int sla); | |
int (*bus_transceive)(NUTI2C_SLAVE*,NUTI2C_MSG*); | |
uint32_t bus_timeout; | |
long bus_rate; | |
uint_fast8_t bus_flags; | |
HANDLE bus_mutex; | |
} |
struct _NUTI2C_SLAVE | |
{ | |
NUTI2C_BUS* slave_bus; | |
int slave_address; | |
uint32_t slave_timeout; | |
NUTI2C_MSG* slave_msg; | |
} |