31#ifndef _F28M35X_ETH_DRIVER_H
32#define _F28M35X_ETH_DRIVER_H
38#ifndef F28M35X_ETH_IRQ_PRIORITY_GROUPING
39 #define F28M35X_ETH_IRQ_PRIORITY_GROUPING 3
40#elif (F28M35X_ETH_IRQ_PRIORITY_GROUPING < 0)
41 #error F28M35X_ETH_IRQ_PRIORITY_GROUPING parameter is not valid
45#ifndef F28M35X_ETH_IRQ_PRIORITY
46 #define F28M35X_ETH_IRQ_PRIORITY 192
47#elif (F28M35X_ETH_IRQ_PRIORITY < 0)
48 #error F28M35X_ETH_IRQ_PRIORITY parameter is not valid
52#define MAC_RIS_R HWREG(ETH_BASE + MAC_O_RIS)
53#define MAC_IACK_R HWREG(ETH_BASE + MAC_O_IACK)
54#define MAC_IM_R HWREG(ETH_BASE + MAC_O_IM)
55#define MAC_RCTL_R HWREG(ETH_BASE + MAC_O_RCTL)
56#define MAC_TCTL_R HWREG(ETH_BASE + MAC_O_TCTL)
57#define MAC_DATA_R HWREG(ETH_BASE + MAC_O_DATA)
58#define MAC_IA0_R HWREG(ETH_BASE + MAC_O_IA0)
59#define MAC_IA1_R HWREG(ETH_BASE + MAC_O_IA1)
60#define MAC_THR_R HWREG(ETH_BASE + MAC_O_THR)
61#define MAC_MCTL_R HWREG(ETH_BASE + MAC_O_MCTL)
62#define MAC_MDV_R HWREG(ETH_BASE + MAC_O_MDV)
63#define MAC_MAR_R HWREG(ETH_BASE + 0x28)
64#define MAC_MTXD_R HWREG(ETH_BASE + MAC_O_MTXD)
65#define MAC_MRXD_R HWREG(ETH_BASE + MAC_O_MRXD)
66#define MAC_NP_R HWREG(ETH_BASE + MAC_O_NP)
67#define MAC_TR_R HWREG(ETH_BASE + MAC_O_TR)
68#define MAC_TS_R HWREG(ETH_BASE + MAC_O_TS)
79error_t f28m35xEthInit(NetInterface *interface);
80void f28m35xEthInitGpio(NetInterface *interface);
82void f28m35xEthTick(NetInterface *interface);
84void f28m35xEthEnableIrq(NetInterface *interface);
85void f28m35xEthDisableIrq(NetInterface *interface);
86void f28m35xEthIrqHandler(
void);
87void f28m35xEthEventHandler(NetInterface *interface);
89error_t f28m35xEthSendPacket(NetInterface *interface,
90 const NetBuffer *buffer,
size_t offset, NetTxAncillary *ancillary);
92error_t f28m35xEthReceivePacket(NetInterface *interface);
94error_t f28m35xEthUpdateMacAddrFilter(NetInterface *interface);
95error_t f28m35xEthUpdateMacConfig(NetInterface *interface);
97void f28m35xEthWritePhyReg(uint8_t opcode, uint8_t phyAddr,
98 uint8_t regAddr, uint16_t data);
100uint16_t f28m35xEthReadPhyReg(uint8_t opcode, uint8_t phyAddr,
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
NIC driver.
Definition nic.h:283