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  
   {  
      u_char ph_status;  
      u_char ph_nextpg;  
      u_short 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() nut/net/confnet.c
  NutRegisterIrqHandler() nut/dev/ihndlr.c
  NutSleep() nut/os/timer.c
  NutThreadCreate() nut/arch/avr/os/context_gcc.c
  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() nut/os/event.c
  NutSleep() nut/os/timer.c
  NutThreadSetPriority() nut/os/thread.c
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() nut/dev/netbuf.c
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 u_char 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() nut/os/thread.c
Called by: NicOutput() nut/arch/avr/dev/nicrtl.c

Local Function NicRead()

static void NicRead ( u_char* buf, u_short 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 u_char* 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 ( u_char* buf, u_short len )
Called by: NicPutPacket() nut/arch/avr/dev/nicrtl.c