File nut/arch/avr/dev/sja1000.c

References Functions: SJAInit() nut/arch/avr/dev/sja1000.c
  SJAInput() nut/arch/avr/dev/sja1000.c
  SJAOutput() nut/arch/avr/dev/sja1000.c
  SJARxAvail() nut/arch/avr/dev/sja1000.c
  SJASetAccCode() nut/arch/avr/dev/sja1000.c
  SJASetAccMask() nut/arch/avr/dev/sja1000.c
  SJASetBaudrate() nut/arch/avr/dev/sja1000.c
  SJATxFree() nut/arch/avr/dev/sja1000.c
References Variables: dcb_sja1000 nut/arch/avr/dev/sja1000.c
  ifc_sja1000 nut/arch/avr/dev/sja1000.c

Included Files


Preprocessor definitions

#define SJA_SIGNAL sig_INTERRUPT7

#define SJA_EICR EICRB

#define SJA_SIGNAL_BIT 7

#define CAN_BufSize 64


Type struct _CANBuffer

struct _CANBuffer
struct _CANBuffer  
   {  
      CANFRAME* dataptr;  
      u_short size;  
      u_short datalength;  
      u_short dataindex;  
      SEM empty;  
      SEM full;  
   }  

Typedef CANBuffer

typedef struct _CANBuffer CANBuffer
See: Type struct _CANBuffer

Global Variable dcb_sja1000

CANINFO dcb_sja1000
Visible in:   nut/arch/avr/dev/sja1000.c
Used in:   nut/arch/avr/dev/sja1000.c

Global Variable sja_base

volatile u_short sja_base
Visible in:   nut/arch/avr/dev/sja1000.c
Used in: CAN_Tx() nut/arch/avr/dev/sja1000.c
  SJAInit() nut/arch/avr/dev/sja1000.c
  SJAInput() nut/arch/avr/dev/sja1000.c
  SJAInterrupt() nut/arch/avr/dev/sja1000.c
  SJARxFrame() nut/arch/avr/dev/sja1000.c
  SJASetAccCode() nut/arch/avr/dev/sja1000.c
  SJASetAccMask() nut/arch/avr/dev/sja1000.c
  SJASetBaudrate() nut/arch/avr/dev/sja1000.c
  SJATxFrame() nut/arch/avr/dev/sja1000.c

Global Variable CAN_RX_BUF

CANBuffer CAN_RX_BUF
Visible in:   nut/arch/avr/dev/sja1000.c
Used in: SJAInit() nut/arch/avr/dev/sja1000.c
  SJAInput() nut/arch/avr/dev/sja1000.c
  SJAInterrupt() nut/arch/avr/dev/sja1000.c
  SJARxAvail() nut/arch/avr/dev/sja1000.c

Global Variable CAN_TX_BUF

CANBuffer CAN_TX_BUF
Visible in:   nut/arch/avr/dev/sja1000.c
Used in: CAN_Tx() nut/arch/avr/dev/sja1000.c
  SJAInit() nut/arch/avr/dev/sja1000.c
  SJAOutput() nut/arch/avr/dev/sja1000.c
  SJATxFree() nut/arch/avr/dev/sja1000.c

Global Variable ifc_sja1000

IFCAN ifc_sja1000
Visible in:   nut/arch/avr/dev/sja1000.c
Used in:   nut/arch/avr/dev/sja1000.c

Global Variable devSJA1000

NUTDEVICE devSJA1000
Visible in:   nut/arch/avr/dev/sja1000.c

Global Function CANBufferFree()

u_short CANBufferFree ( CANBuffer* buffer )
Called by: SJATxFree() nut/arch/avr/dev/sja1000.c

Global Function CANBufferGet()

CANFRAME CANBufferGet ( CANBuffer* buffer )
Called by: SJAInput() nut/arch/avr/dev/sja1000.c

Global Function CANBufferGetMutex()

CANFRAME CANBufferGetMutex ( CANBuffer* buffer )
Calls: NutSemPost() nut/os/semaphore.c
  NutSemWait() nut/os/semaphore.c
Called by: CAN_Tx() nut/arch/avr/dev/sja1000.c

Global Function CANBufferInit()

void CANBufferInit ( CANBuffer* buffer, u_short size )
Calls: NutHeapAlloc() nut/os/heap.c
  NutSemInit() nut/os/semaphore.c
Called by: SJAInit() nut/arch/avr/dev/sja1000.c

Global Function CANBufferPut()

void CANBufferPut ( CANBuffer* buffer, CANFRAME* data )
Called by: SJAInterrupt() nut/arch/avr/dev/sja1000.c

Global Function CANBufferPutMutex()

void CANBufferPutMutex ( CANBuffer* buffer, CANFRAME* data )
Calls: NutSemPost() nut/os/semaphore.c
  NutSemWait() nut/os/semaphore.c
Called by: SJAOutput() nut/arch/avr/dev/sja1000.c

Global Function CAN_Tx()

void CAN_Tx ( void* arg )
Prototyped in: nut/arch/avr/dev/sja1000.c
Calls: CANBufferGetMutex() nut/arch/avr/dev/sja1000.c
  NutEventWait() nut/os/event.c
  NutThreadSetPriority() nut/os/thread.c
  SJATxFrame() nut/arch/avr/dev/sja1000.c
Used in: SJAInit() nut/arch/avr/dev/sja1000.c
References Variables: CAN_TX_BUF nut/arch/avr/dev/sja1000.c
  sja_base nut/arch/avr/dev/sja1000.c

Global Function SJAInit()

int SJAInit ( NUTDEVICE* dev )
Calls: CANBufferInit() nut/arch/avr/dev/sja1000.c
  NutRegisterIrqHandler() nut/dev/ihndlr.c
  NutThreadCreate() nut/arch/avr/os/context_gcc.c
  memset()
Used in:   nut/arch/avr/dev/sja1000.c
References Functions: CAN_Tx() nut/arch/avr/dev/sja1000.c
  SJAInterrupt() nut/arch/avr/dev/sja1000.c
References Variables: CAN_RX_BUF nut/arch/avr/dev/sja1000.c
  CAN_TX_BUF nut/arch/avr/dev/sja1000.c
  sja_base nut/arch/avr/dev/sja1000.c

Global Function SJAInput()

void SJAInput ( NUTDEVICE* dev, CANFRAME* frame )
Calls: CANBufferGet() nut/arch/avr/dev/sja1000.c
  NutEventWait() nut/os/event.c
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: CAN_RX_BUF nut/arch/avr/dev/sja1000.c
  sja_base nut/arch/avr/dev/sja1000.c

Global Function SJAOutput()

void SJAOutput ( NUTDEVICE* dev, CANFRAME* frame )
Calls: CANBufferPutMutex() nut/arch/avr/dev/sja1000.c
  NutEventPostAsync() nut/os/event.c
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: CAN_TX_BUF nut/arch/avr/dev/sja1000.c

Global Function SJARxAvail()

inline u_char SJARxAvail ( NUTDEVICE* dev )
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: CAN_RX_BUF nut/arch/avr/dev/sja1000.c

Global Function SJARxFrame()

void SJARxFrame ( CANFRAME* CAN_frame )
Called by: SJAInterrupt() nut/arch/avr/dev/sja1000.c
References Variables: sja_base nut/arch/avr/dev/sja1000.c

Global Function SJASetAccCode()

Note - if you change SJA1000_MODECTRL, change it in

void SJASetAccCode ( NUTDEVICE* dev, u_char* ac )

Calls: memcpy()
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: sja_base nut/arch/avr/dev/sja1000.c

Global Function SJASetAccMask()

Note - if you change SJA1000_MODECTRL, change it in

void SJASetAccMask ( NUTDEVICE* dev, u_char* am )

Calls: memcpy()
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: sja_base nut/arch/avr/dev/sja1000.c

Global Function SJASetBaudrate()

u_char SJASetBaudrate ( NUTDEVICE* dev, u_long baudrate )
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: sja_base nut/arch/avr/dev/sja1000.c

Global Function SJATxFrame()

void SJATxFrame ( CANFRAME* CAN_frame )
Called by: CAN_Tx() nut/arch/avr/dev/sja1000.c
References Variables: sja_base nut/arch/avr/dev/sja1000.c

Global Function SJATxFree()

inline u_char SJATxFree ( NUTDEVICE* dev )
Calls: CANBufferFree() nut/arch/avr/dev/sja1000.c
Used in:   nut/arch/avr/dev/sja1000.c
References Variables: CAN_TX_BUF nut/arch/avr/dev/sja1000.c

Local Function SJAInterrupt()

static void SJAInterrupt ( void* arg )
Calls: CANBufferPut() nut/arch/avr/dev/sja1000.c
  SJARxFrame() nut/arch/avr/dev/sja1000.c
Used in: SJAInit() nut/arch/avr/dev/sja1000.c
References Variables: CAN_RX_BUF nut/arch/avr/dev/sja1000.c
  sja_base nut/arch/avr/dev/sja1000.c