Driver for Micrel KSZ8851SNL Ethernet controller. More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | KSZ8851SLN_mib_t |
The MIB (Management Information Base) Counters that the ksz8851snl device expose to the host. More... | |
Defines | |
#define | KSZ8851SNL_INT_LINK_CHANGE 0x8000 |
Enable link change interrupt. | |
#define | KSZ8851SNL_INT_TX_DONE 0x4000 |
Enable transmit done interrupt. | |
#define | KSZ8851SNL_INT_RX_DONE 0x2000 |
Enable receive interrupt. | |
#define | KSZ8851SNL_INT_RX_OVERRUN 0x0800 |
Enable receive overrun interrupt. | |
#define | KSZ8851SNL_INT_TX_STOPPED 0x0200 |
Enable transmit process stopped interrupt. | |
#define | KSZ8851SNL_INT_RX_STOPPED 0x0100 |
Enable receive process stopped interrupt. | |
#define | KSZ8851SNL_INT_TX_SPACE 0x0040 |
Enable transmit space available interrupt. | |
#define | KSZ8851SNL_INT_RX_WOL_FRAME 0x0020 |
Enable WOL on receive wake-up frame detect interrupt. | |
#define | KSZ8851SNL_INT_MAGIC 0x0010 |
Enable magic packet detect interrupt. | |
#define | KSZ8851SNL_INT_LINKUP 0x0008 |
Enable link up detect interrupt. | |
#define | KSZ8851SNL_INT_ENERGY 0x0004 |
Enable detect interrupt. | |
#define | KSZ8851SNL_INT_SPI_ERROR 0x0002 |
Enable receive SPI bus error interrupt. | |
#define | KSZ8851SNL_INT_ENABLE_MASK |
Service RX done, link change and error IRQs. | |
Functions | |
void | KSZ8851SNL_Init (void) |
Initialize the registers of the ethernet controller. | |
void | KSZ8851SNL_Enable (void) |
Enable RX and TX. | |
uint16_t | KSZ8851SNL_Receive (uint16_t length, uint8_t *buffer) |
Performs the actual receive of a raw frame over the network. | |
bool | KSZ8851SNL_TransmitBegin (uint16_t length) |
Prepares for a transmission of an ethernet frame over the network. | |
void | KSZ8851SNL_Transmit (uint16_t length, const uint8_t *buffer) |
Transmit a chunk of data to the ethernet controller. | |
void | KSZ8851SNL_TransmitEnd (uint16_t length) |
Ends a transmission of an ethernet frame to the ethernet controller. | |
void | KSZ8851SNL_MacAddressGet (uint8_t *macAddress) |
Get the MAC address of the current board. | |
void | KSZ8851SNL_PMECRStatusClear (uint16_t flags) |
Clear PMECR (Power Management Event Control Register) flags. | |
void | KSZ8851SNL_FrameCounterSet (void) |
FrameCounter. | |
uint16_t | KSZ8851SNL_FrameCounterGet (void) |
FrameCounter. | |
void | KSZ8851SNL_IntEnable (void) |
enables the chip interrupts | |
void | KSZ8851SNL_IntDisable (void) |
disables the chip interrupts | |
void | KSZ8851SNL_IntClear (uint16_t flags) |
Clear interrupt flags. | |
uint16_t | KSZ8851SNL_IntGet (void) |
Get interrupt flags. | |
uint16_t | KSZ8851SNL_RXQCRGet (void) |
Get RXQCR register. | |
uint16_t | KSZ8851SNL_PHYStatusGet (void) |
Get the PHY status. | |
void | KSZ8851SNL_TxQueueReset (void) |
Reset TxQueue. | |
void | KSZ8851SNL_RxQueueReset (void) |
Reset RxQueue. | |
void | KSZ8851SNL_RegistersDump (void) |
Prints the value of the registers of the ethernet controller. | |
void | KSZ8851SNL_AllRegistersDump (void) |
Prints the value of the registers of the ethernet controller. | |
void | KSZ8851SNL_MIBCountersDump (void) |
Dumps the Management Information Base Counters. | |
void | KSZ8851SNL_MIBCountersUpdate (void) |
Update the Management Information Base Counters. |
Driver for Micrel KSZ8851SNL Ethernet controller.
(C) Copyright 2015 Silicon Labs, http://www.silabs.com
This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file ksz8851snl.h.