The ENET example is a simple ethernet application for sending an ethernet packet via the MAC and displaying received broadcast packets.
To use the example, connect a serial cable to the board's RS232/UART port and start a terminal program to monitor the port. The terminal program on the host PC should be setup for 115K8N1. For each packet received, the LED will toggle and the packets source and destination MAC addresses will be displayed with the packet type. Pressing any key will send a dummy packet.
No special setup is required for the demo. Just build and run.
Build procedure: LPCOpen 18xx/43xx build instructions
Supported boards and board setup:
- Hitex LPC1850EVA-A4-2 and LPC4350EVA-A4-2 boards - MII configuration
- Keil MCB1857 and MCB4357 boards - RMII configuration
- NGX Xplorer 1830 and 4330 boards - RMII configuration
Submit bug reports for LPCOpen code here.
#define ENET_NUM_RX_DESC 4 |
#define ENET_NUM_TX_DESC 4 |
static void* ENET_RXGet |
( |
int32_t * |
bytes | ) |
|
|
static |
static void ENET_RXQueue |
( |
void * |
buffer, |
|
|
int32_t |
bytes |
|
) |
| |
|
static |
static void* ENET_TXBuffClaim |
( |
void |
| ) |
|
|
static |
static void ENET_TXQueue |
( |
void * |
buffer, |
|
|
int32_t |
bytes |
|
) |
| |
|
static |
void ETH_IRQHandler |
( |
void |
| ) |
|
Handle interrupt from ethernet.
- Returns
- Nothing
Definition at line 232 of file enet.c.
static __INLINE int32_t incIndex |
( |
int32_t |
index, |
|
|
int32_t |
max |
|
) |
| |
|
static |
main routine for ENET example
- Returns
- Nothing (function should not exit)
Definition at line 241 of file enet.c.