#include <arch/cm3.h>
#include <cfg/os.h>
#include <cfg/dev.h>
#include <cfg/arch/gpio.h>
#include <string.h>
#include <sys/atom.h>
#include <sys/heap.h>
#include <sys/thread.h>
#include <sys/event.h>
#include <sys/timer.h>
#include <sys/confnet.h>
#include <netinet/if_ether.h>
#include <net/ether.h>
#include <net/if_var.h>
#include <dev/gpio.h>
#include <dev/irqreg.h>
#include <dev/phy.h>
#include <arch/cm3/nxp/lpc17xx_emac.h>
#include <stdio.h>
#include <arpa/inet.h>
Data Structures | |
struct | _BufDescriptor |
struct | _EMACINFO |
Network interface controller information structure. More... | |
Defines | |
#define | EMPRINTF(args,...) printf(args,##__VA_ARGS__); |
#define | NUT_THREAD_NICRXSTACK 512 |
#define | EMAC_LINK_LOOPS 1000 |
#define | NIC_PHY_ADDR 0 |
PHY address. | |
Typedefs | |
typedef struct _BufDescriptor | BufDescriptor |
typedef struct _EMACINFO | EMACINFO |
Network interface controller information type. | |
Functions | |
EMAC_BUFF_STATUS | Lpc17xxEmacGetBufferStatus (EMAC_BUFF_IDX idx) |
Query buffer status. | |
void | Lpc17xxEmacRxThread (void *arg) |
int | Lpc17xxEmacOutput (NUTDEVICE *dev, NETBUF *nb) |
Send Ethernet packet. | |
int | Lpc17xxEmacInit (NUTDEVICE *dev) |
Initialize Ethernet hardware. | |
Variables | |
const uint8_t | emac_clkdiv [] = { 4, 6, 8, 10, 14, 20, 28, 36, 40, 44, 48, 52, 56, 60, 64 } |
NUTDEVICE | devLpc17xxEmac |
Device information structure. |
#define EMPRINTF | ( | args, | |
... | |||
) | printf(args,##__VA_ARGS__); |
Referenced by Lpc17xxEmacInit(), and Lpc17xxEmacRxThread().
#define NUT_THREAD_NICRXSTACK 512 |
Referenced by Lpc17xxEmacInit().
#define EMAC_LINK_LOOPS 1000 |
Referenced by Lpc17xxEmacInit(), and Lpc17xxEmacRxThread().
#define NIC_PHY_ADDR 0 |
PHY address.
Any other than 0 seems to create problems with Atmel's evaluation kits.
typedef struct _BufDescriptor BufDescriptor |
const uint8_t emac_clkdiv[] = { 4, 6, 8, 10, 14, 20, 28, 36, 40, 44, 48, 52, 56, 60, 64 } |