File nut/dev/twbbif.c

References Functions: TwBbifInit() 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


Global Variable TwBbifBus

NUTTWIBUS TwBbifBus
Visible in:   nut/dev/twbbif.c

Local Variables

twibb_initialized
static int twibb_initialized
Used in: NutTwiMasterTranceive()  
  TwBbifInit()  

Global Function NutDestroyTwiBus()

int NutDestroyTwiBus ( NUTTWIBUS* bus )
Prototyped in: nut/include/dev/twif.h
Calls: NutHeapRootFree()

Global Function NutRegisterTwiBus()

int NutRegisterTwiBus ( NUTTWIBUS* bus, uint8_t sla )
Prototyped in: nut/include/dev/twif.h
Calls: memset() nut/c/string/memset.c
  NutEventPost(), NutHeapRootAlloc()
Called by: DS1307Init() nut/dev/ds1307rtc.c
  EEInit() nut/dev/eeprom.c
  NutTwiMasterTranceive() nut/dev/twbbif.c
  PcfRtcInit() nut/dev/pcf8563.c

Global Function NutTwiGetSpeed()

uint32_t NutTwiGetSpeed ( NUTTWIBUS* bus )
Called by: NutTwiIOCtl() nut/dev/twbbif.c

Global Function NutTwiIOCtl()

int NutTwiIOCtl ( NUTTWIBUS* bus, int req, void* conf )
Prototyped in: nut/include/dev/twif.h
Calls: NutTwiGetSpeed() nut/dev/twbbif.c
  NutTwiSetSpeed() nut/dev/twbbif.c

Global Function NutTwiMasterError()

int NutTwiMasterError ( NUTTWIBUS* bus )
Prototyped in: nut/include/dev/twif.h

Global Function NutTwiMasterTranceive()

int NutTwiMasterTranceive ( NUTTWIBUS* bus, 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: NutRegisterTwiBus() nut/dev/twbbif.c
  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
  NutEventPost(), NutEventWait()
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
  ShtCommand() nut/dev/sht21.c
References Variables: twibb_initialized nut/dev/twbbif.c

Global Function NutTwiSetSpeed()

int NutTwiSetSpeed ( NUTTWIBUS* bus, uint32_t speed )
Called by: NutTwiIOCtl() nut/dev/twbbif.c

Global Function NutTwiSlaveError()

int NutTwiSlaveError ( NUTTWIBUS* bus )
Prototyped in: nut/include/dev/twif.h

Global Function NutTwiSlaveListen()

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

Global Function NutTwiSlaveRespond()

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

Global Function TwBbifInit()

int TwBbifInit ( void )
Used in:   nut/dev/twbbif.c
References Variables: twibb_initialized nut/dev/twbbif.c

Local Function TwAck()

static void TwAck ( void )
Calls: TwDelay() nut/dev/twbbif.c
Called by: NutTwiMasterTranceive() 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: NutTwiMasterTranceive() nut/dev/twbbif.c

Local Function TwPut()

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

Local Function TwStart()

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

Local Function TwStop()

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