#include <string.h>
#include <dev/irqreg.h>
#include <sys/event.h>
#include <sys/atom.h>
#include <sys/timer.h>
#include <sys/thread.h>
#include <sys/heap.h>
#include <dev/twif.h>
Defines | |
#define | TWGO (_BV(TWINT) | _BV(TWEN) | _BV(TWIE)) |
Functions | |
int | NutTwiMasterTranceive (NUTTWIBUS *bus, uint8_t sla, const void *txdata, uint16_t txlen, void *rxdata, uint16_t rxsiz, uint32_t tmo) |
Transmit and/or receive data as a master. | |
int | NutTwiMasterError (NUTTWIBUS *bus) |
Get last master mode error. | |
int | NutTwiSlaveListen (NUTTWIBUS *bus, uint8_t *sla, void *rxdata, uint16_t rxsiz, uint32_t tmo) |
Listen for incoming data from a master. | |
int | NutTwiSlaveRespond (NUTTWIBUS *bus, void *txdata, uint16_t txlen, uint32_t tmo) |
Send response to a master. | |
int | NutTwiSlaveError (NUTTWIBUS *bus) |
Get last slave mode error. | |
int | NutTwiSetSpeed (NUTTWIBUS *bus, uint32_t speed) |
int | NutTwiGetSpeed (NUTTWIBUS *bus) |
Request Current Speed of I2C Interface. | |
int | NutTwiIOCtl (NUTTWIBUS *bus, int req, void *conf) |
Perform TWI control functions. | |
int | NutRegisterTwiBus (NUTTWIBUS *bus, uint8_t sla) |
Initialize TWI interface bus. | |
int | NutDestroyTwiBus (NUTTWIBUS *bus) |
Variables | |
NUTTWIBUS | TwBbifBus |
TWI/I2C bus structure. |
#define TWGO (_BV(TWINT) | _BV(TWEN) | _BV(TWIE)) |
Referenced by NutTwiSlaveRespond().
int NutTwiGetSpeed | ( | NUTTWIBUS * | bus | ) |
Request Current Speed of I2C Interface.
References bit_is_set, inb, NutGetCpuClock(), and rc.