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

#define TWI_DELAY 8


Local Variables

tw_mm_error
static u_char 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 ( u_char sla )
Prototyped in: nut/include/dev/twif.h
Called by: DS1307Init() nut/dev/ds1307rtc.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 ( u_char sla, const void* txdata, u_short txlen, void* rxdata, u_short rxsiz, u_long 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
  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 ( u_char* sla, void* rxdata, u_short rxsiz, u_long tmo )
Prototyped in: nut/include/dev/twif.h

Global Function TwSlaveRespond()

int TwSlaveRespond ( void* txdata, u_short txlen, u_long 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 u_char TwGet ( void )
Calls: TwDelay() nut/dev/twbbif.c
Called by: TwMasterTransact() nut/dev/twbbif.c

Local Function TwPut()

static int TwPut ( u_char 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