#define TWI_SETSPEED 0x0401
#define TWI_GETSPEED 0x0402
#define TWI_SETSLAVEADDRESS 0x0403
#define TWI_GETSLAVEADDRESS 0x0404
#define TWI_SETSTATUS 0x0409
#define TWI_GETSTATUS 0x040a
#define TWERR_OK 0
#define TWERR_TIMEOUT -1
#define TWERR_BUS -2
#define TWERR_IF_LOCKED -3
#define TWERR_SLA_NACK -4
#define TWERR_DATA_NACK -5
#define TWERR_OVRE -6
#define TWERR_ARBLOST -7
#define TWERR_SPCTOUT -8
#define TWERR_BUSY -9
#define TWSLA_MIN 17
#define TWSLA_MAX 79
#define TWSLA_BCAST 0
#define TWSLA_HOST 16
#define TWSLA_DEFAULT 193
#define TwInit( slv )
#define TwIOCtl( req, conf )
#define TwMasterTransact( sla, txd, txl, rxd, rxs, tmo )
#define TwMasterRegRead( sla, iadr, ial, rxd, rxs, tmo )
#define TwMasterRegWrite( sla, iadr, ial, txd, txs, tmo )
#define TwMasterError( void )
#define TwMasterIndexes( idx )
#define TwSlaveListen( sla, rxdata, rxsiz, tmo )
#define TwSlaveRespond( txdata, txlen, tmo )
#define TwSlaveError( void )
See: | Type struct _NUTTWIBUS |
struct _NUTTWIBUS | |
{ | |
uptr_t bus_base; | |
IRQ_HANDLER* bus_sig_ev; | |
IRQ_HANDLER* bus_sig_er; | |
HANDLE bus_mutex; | |
NUTTWIICB* bus_icb; | |
uint_fast8_t bus_dma_tx; | |
uint_fast8_t bus_dma_rx; | |
int (*bus_initbus)(void); | |
int (*bus_recover)(void); | |
} |