File nut/dev/twbbif.c


Included Files


Preprocessor definitions

#define TWI_SDA_BIT 0

#define TWI_SDA_PORT PORTB

#define TWI_SDA_PIN PINB

#define TWI_SDA_DDR DDRB

#define TWI_SCL_BIT 1

#define TWI_SCL_PORT PORTB

#define TWI_SCL_DDR DDRB

#define TWI_ENABLE

#define SDA_LOW

#define SDA_HIGH

#define SDA_STAT

#define SCL_LOW

#define SCL_HIGH


Local Variables

tw_mm_error
static uint8_t tw_mm_error
Used in: TwMasterError()  
  TwMasterTransact()  

twibb_initialized
static int twibb_initialized

Used in: TwInit()  
  TwMasterTransact()  

Global Function TwIOCtl()

int TwIOCtl ( int req, void* conf )
Prototyped in: nut/include/dev/twif.h

Global Function TwInit()

int TwInit ( uint8_t sla )
Prototyped in: nut/include/dev/twif.h
Called by: DS1307Init() nut/dev/ds1307rtc.c
  NvMemInit() nut/boot/bootmon/nvmem.c
  PcfRtcInit() nut/dev/pcf8563.c
  TwMasterTransact() nut/dev/twbbif.c
References Variables: twibb_initialized nut/dev/twbbif.c

Global Function TwMasterError()

int TwMasterError ( void )
Prototyped in: nut/include/dev/twif.h
References Variables: tw_mm_error nut/dev/twbbif.c

Global Function TwMasterTransact()

int TwMasterTransact ( uint8_t sla, const void* txdata, uint16_t txlen, void* rxdata, uint16_t rxsiz, uint32_t tmo )
Prototyped in: nut/include/dev/twif.h
Calls: TwAck() nut/dev/twbbif.c
  TwGet() nut/dev/twbbif.c
  TwInit() nut/dev/twbbif.c
  TwPut() nut/dev/twbbif.c
  TwStart() nut/dev/twbbif.c
  TwStop() nut/dev/twbbif.c
Called by: Cy2239xGetDivider() nut/dev/cy2239x.c
  Cy2239xGetFreq() nut/dev/cy2239x.c
  Cy2239xGetPll() nut/dev/cy2239x.c
  Cy2239xPllEnable() nut/dev/cy2239x.c
  Cy2239xPllGetFreq() nut/dev/cy2239x.c
  Cy2239xPllSetFreq() nut/dev/cy2239x.c
  Cy2239xSetDivider() nut/dev/cy2239x.c
  Cy2239xSetPll() nut/dev/cy2239x.c
  DS1307RamWrite() nut/dev/ds1307rtc.c
  DS1307RtcReadRegs() nut/dev/ds1307rtc.c
  DS1307RtcWrite() nut/dev/ds1307rtc.c
  NvMemRead() nut/boot/bootmon/nvmem.c
  NvMemWaitReady() nut/boot/bootmon/nvmem.c
  NvMemWrite() nut/boot/bootmon/nvmem.c
  NvMemWriteEnable() nut/boot/bootmon/nvmem.c
  PcfRtcReadRegs() nut/dev/pcf8563.c
  PcfRtcWrite() nut/dev/pcf8563.c
References Variables: tw_mm_error nut/dev/twbbif.c
  twibb_initialized nut/dev/twbbif.c

Global Function TwSlaveError()

int TwSlaveError ( void )
Prototyped in: nut/include/dev/twif.h

Global Function TwSlaveListen()

int TwSlaveListen ( uint8_t* sla, void* rxdata, uint16_t rxsiz, uint32_t tmo )
Prototyped in: nut/include/dev/twif.h

Global Function TwSlaveRespond()

int TwSlaveRespond ( void* txdata, uint16_t txlen, uint32_t tmo )
Prototyped in: nut/include/dev/twif.h

Local Function TwAck()

static void TwAck ( void )
Calls: TwDelay() nut/dev/twbbif.c
Called by: TwMasterTransact() nut/dev/twbbif.c

Local Function TwDelay()

static void TwDelay ( int nops )
Called by: TwAck() nut/dev/twbbif.c
  TwGet() nut/dev/twbbif.c
  TwPut() nut/dev/twbbif.c
  TwStart() nut/dev/twbbif.c
  TwStop() nut/dev/twbbif.c

Local Function TwGet()

static uint8_t TwGet ( void )
Calls: TwDelay() nut/dev/twbbif.c
Called by: TwMasterTransact() nut/dev/twbbif.c

Local Function TwPut()

static int TwPut ( uint8_t octet )
Calls: TwDelay() nut/dev/twbbif.c
Called by: TwMasterTransact() nut/dev/twbbif.c

Local Function TwStart()

static void TwStart ( void )
Calls: TwDelay() nut/dev/twbbif.c
Called by: TwMasterTransact() nut/dev/twbbif.c

Local Function TwStop()

static void TwStop ( void )
Calls: TwDelay() nut/dev/twbbif.c
Called by: TwMasterTransact() nut/dev/twbbif.c