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


Included Files


Preprocessor definitions

#define NUT_THREAD_NICRXSTACK 640

#define RTL_EE_MEMBUS

#define RTL_EESK_PIN PINC

#define RTL_EESK_DDR DDRC

#define RTL_EE_MEMBUS

#define RTL_EEDO_PORT PORTC

#define RTL_EEDO_DDR DDRC

#define RTL_EE_MEMBUS

#define RTL_EEMU_PORT PORTC

#define RTL_EEMU_DDR DDRC

#define RTL_SIGNAL sig_INTERRUPT5

#define NIC_PAGE_SIZE 0x100

#define NIC_START_PAGE 0x40

#define NIC_STOP_PAGE 0x60

#define NIC_TX_PAGES 6

#define NIC_TX_BUFFERS 1

#define NIC_FIRST_TX_PAGE NIC_START_PAGE

#define NIC_FIRST_RX_PAGE

#define NIC_CR_PAGE0 0

#define NIC_CR_PAGE1 NIC_CR_PS0

#define NIC_CR_PAGE2 NIC_CR_PS1

#define NIC_CR_PAGE3

#define NICINB( reg )

#define NICOUTB( reg, val )


Type struct nic_pkt_header

struct nic_pkt_header
struct nic_pkt_header  
   {  
      uint8_t ph_status;  
      uint8_t ph_nextpg;  
      uint16_t ph_size;  
   }  

Local Variables

nic_eeprom
static prog_char nic_eeprom[18]
Used in: EmulateNicEeprom()  

Global Function NicInit()

int NicInit ( NUTDEVICE* dev )
Prototyped in: nut/include/dev/nicrtl.h
Calls: NicStart() nut/arch/avr/dev/nicrtl.c
  NutNetLoadConfig(), NutRegisterIrqHandler(), NutSleep(), NutThreadCreate(), memcpy(), memset()
Used in:   nut/arch/avr/dev/eth0rtl.c
References Functions: NicInterrupt() nut/arch/avr/dev/nicrtl.c
  NicRx() nut/arch/avr/dev/nicrtl.c

Global Function NicOutput()

int NicOutput ( NUTDEVICE* dev, NETBUF* nb )
Prototyped in: nut/include/dev/nicrtl.h
Calls: NicPutPacket() nut/arch/avr/dev/nicrtl.c
Used in:   nut/arch/avr/dev/eth0rtl.c

Global Function NicRx()

void NicRx ( void* arg )
Prototyped in: nut/arch/avr/dev/nicrtl.c
Calls: NicGetPacket() nut/arch/avr/dev/nicrtl.c
  NicStart() nut/arch/avr/dev/nicrtl.c
  NutEventWait(), NutSleep(), NutThreadSetPriority()
Used in: NicInit() nut/arch/avr/dev/nicrtl.c

Local Function Delay16Cycles()

static inline void Delay16Cycles ( void )
Called by: NicGetPacket() nut/arch/avr/dev/nicrtl.c

Local Function DetectNicEeprom()

static int DetectNicEeprom ( void )
Calls: NutDelay()
Called by: NicStart() nut/arch/avr/dev/nicrtl.c

Local Function EmulateNicEeprom()

static void EmulateNicEeprom ( void )
Calls: NutDelay()
Called by: NicStart() nut/arch/avr/dev/nicrtl.c
References Variables: nic_eeprom nut/arch/avr/dev/nicrtl.c

Local Function NicCompleteDma()

static void NicCompleteDma ( void )
Called by: NicGetPacket() nut/arch/avr/dev/nicrtl.c
  NicPutPacket() nut/arch/avr/dev/nicrtl.c

Local Function NicGetPacket()

static NETBUF* NicGetPacket ( void )
Calls: Delay16Cycles() nut/arch/avr/dev/nicrtl.c
  NicCompleteDma() nut/arch/avr/dev/nicrtl.c
  NicRead() nut/arch/avr/dev/nicrtl.c
  NutNetBufAlloc()
Called by: NicRx() nut/arch/avr/dev/nicrtl.c

Local Function NicInterrupt()

static void NicInterrupt ( void* arg )
Calls: NicOverflow() nut/arch/avr/dev/nicrtl.c
Used in: NicInit() nut/arch/avr/dev/nicrtl.c

Local Function NicOverflow()

static uint8_t NicOverflow ( void )
Called by: NicInterrupt() nut/arch/avr/dev/nicrtl.c

Local Function NicPutPacket()

static int NicPutPacket ( NETBUF* nb )
Calls: NicCompleteDma() nut/arch/avr/dev/nicrtl.c
  NicWrite() nut/arch/avr/dev/nicrtl.c
  NutThreadYield()
Called by: NicOutput() nut/arch/avr/dev/nicrtl.c

Local Function NicRead()

static void NicRead ( uint8_t* buf, uint16_t len )
Called by: NicGetPacket() nut/arch/avr/dev/nicrtl.c

Local Function NicReset()

static int NicReset ( void )
Calls: NutDelay()
Called by: NicStart() nut/arch/avr/dev/nicrtl.c

Local Function NicStart()

static int NicStart ( const uint8_t* mac )
Calls: DetectNicEeprom() nut/arch/avr/dev/nicrtl.c
  EmulateNicEeprom() nut/arch/avr/dev/nicrtl.c
  NicReset() nut/arch/avr/dev/nicrtl.c
  NutDelay()
Called by: NicInit() nut/arch/avr/dev/nicrtl.c
  NicRx() nut/arch/avr/dev/nicrtl.c

Local Function NicWrite()

static void NicWrite ( uint8_t* buf, uint16_t len )
Called by: NicPutPacket() nut/arch/avr/dev/nicrtl.c