nicrtl.c File Reference
Go to the source code of this file.
Define Documentation
#define NUT_THREAD_NICRXSTACK 640 |
#define RTL_EESK_PIN PINB |
#define RTL_EESK_DDR DDRB |
#define RTL_EEDO_PORT PORTB |
#define RTL_EEDO_DDR DDRB |
#define RTL_EEMU_PORT PORTB |
#define RTL_EEMU_DDR DDRB |
#define RTL_RESET_PORT PORTB |
#define RTL_RESET_DDR DDRB |
Interrupt used.
Definition at line 243 of file nicrtl.c.
#define RTL_RISING_EDGE_MODE |
( |
|
) |
sbi(EICRA, ISC00); sbi(EICRA, ISC01) |
#define NIC_PAGE_SIZE 0x100 |
Size of a single ring buffer page.
Definition at line 296 of file nicrtl.c.
#define NIC_START_PAGE 0x40 |
First ring buffer page address.
Definition at line 301 of file nicrtl.c.
#define NIC_STOP_PAGE 0x60 |
Last ring buffer page address plus 1.
Definition at line 306 of file nicrtl.c.
Number of pages in a single transmit buffer.
This should be at least the MTU size.
Definition at line 313 of file nicrtl.c.
Number of transmit buffers.
The initial value had been 2. The idea was to use two alternating buffers. However, this had never been implemented and we took over Bengt Florin's change, defining 1 transmit buffer only and give more buffer space to the receiver.
The controller memory layout is now
- 0x4000..0x45ff 1.5K bytes transmit buffer
- 0x4600..0x5fff 6.5K bytes receive buffer
The routines are still not using the buffers in an optimal way, as transmission is limited to 1 packet at a time. In fact several smaller packets would fit into the 1.5 kByte buffer. On the other hand, filling the buffer with more than one transmission packet may result in other bad effects, like pulling the IORDY line more often.
Definition at line 335 of file nicrtl.c.
#define NIC_FIRST_TX_PAGE NIC_START_PAGE |
#define NIC_FIRST_RX_PAGE (NIC_FIRST_TX_PAGE + NIC_TX_PAGES * NIC_TX_BUFFERS) |
#define NIC_CR_PAGE1 (NIC_CR_PS0) |
#define NIC_CR_PAGE2 (NIC_CR_PS1) |
#define NIC_CR_PAGE3 (NIC_CR_PS1 | NIC_CR_PS0) |