15 #ifndef KSZ8851SNL_H__
16 #define KSZ8851SNL_H__
43 #define KSZ8851SNL_INT_LINK_CHANGE 0x8000
45 #define KSZ8851SNL_INT_TX_DONE 0x4000
47 #define KSZ8851SNL_INT_RX_DONE 0x2000
49 #define KSZ8851SNL_INT_RX_OVERRUN 0x0800
51 #define KSZ8851SNL_INT_TX_STOPPED 0x0200
53 #define KSZ8851SNL_INT_RX_STOPPED 0x0100
55 #define KSZ8851SNL_INT_TX_SPACE 0x0040
57 #define KSZ8851SNL_INT_RX_WOL_FRAME 0x0020
59 #define KSZ8851SNL_INT_MAGIC 0x0010
61 #define KSZ8851SNL_INT_LINKUP 0x0008
63 #define KSZ8851SNL_INT_ENERGY 0x0004
65 #define KSZ8851SNL_INT_SPI_ERROR 0x0002
68 #define KSZ8851SNL_INT_ENABLE_MASK (KSZ8851SNL_INT_RX_DONE | \
69 KSZ8851SNL_INT_RX_STOPPED | \
70 KSZ8851SNL_INT_TX_STOPPED | \
71 KSZ8851SNL_INT_LINK_CHANGE | \
72 KSZ8851SNL_INT_SPI_ERROR)
void KSZ8851SNL_Enable(void)
Enable RX and TX.
void KSZ8851SNL_IntDisable(void)
disables the chip interrupts
void KSZ8851SNL_MacAddressGet(uint8_t *macAddress)
Get the MAC address of the current board.
void KSZ8851SNL_IntClear(uint16_t flags)
Clear interrupt flags.
uint32_t TxMulticastPktsCnt
void KSZ8851SNL_RxQueueReset(void)
Reset RxQueue.
void KSZ8851SNL_Init(void)
Initialize the registers of the ethernet controller.
void KSZ8851SNL_TxQueueReset(void)
Reset TxQueue.
void KSZ8851SNL_AllRegistersDump(void)
Prints the value of the registers of the ethernet controller.
uint32_t RxUndersizePktCnt
uint32_t TxBroadcastPktsCnt
uint16_t KSZ8851SNL_PHYStatusGet(void)
Get the PHY status.
void KSZ8851SNL_FrameCounterSet(void)
FrameCounter.
uint32_t TxUnicastPktsCnt
bool KSZ8851SNL_TransmitBegin(uint16_t length)
Prepares for a transmission of an ethernet frame over the network.
uint16_t KSZ8851SNL_FrameCounterGet(void)
FrameCounter.
struct KSZ8851SLN_mib_s KSZ8851SLN_mib_t
The MIB (Management Information Base) Counters that the ksz8851snl device expose to the host...
void KSZ8851SNL_MIBCountersDump(void)
Dumps the Management Information Base Counters.
void KSZ8851SNL_RegistersDump(void)
Prints the value of the registers of the ethernet controller.
void KSZ8851SNL_MIBCountersUpdate(void)
Update the Management Information Base Counters.
void KSZ8851SNL_TransmitEnd(uint16_t length)
Ends a transmission of an ethernet frame to the ethernet controller.
uint16_t KSZ8851SNL_Receive(uint16_t length, uint8_t *buffer)
Performs the actual receive of a raw frame over the network.
uint32_t RxSymbolErrorCnt
void KSZ8851SNL_Transmit(uint16_t length, const uint8_t *buffer)
Transmit a chunk of data to the ethernet controller. The chunk can be either a full ethernet frame or...
uint16_t KSZ8851SNL_RXQCRGet(void)
Get RXQCR register.
void KSZ8851SNL_IntEnable(void)
enables the chip interrupts
uint32_t TxTotalCollisionCnt
void KSZ8851SNL_PMECRStatusClear(uint16_t flags)
Clear PMECR (Power Management Event Control Register) flags.
uint16_t KSZ8851SNL_IntGet(void)
Get interrupt flags.
The MIB (Management Information Base) Counters that the ksz8851snl device expose to the host...