EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
ksz8851snl.h File Reference

Detailed Description

Driver for Micrel KSZ8851SNL Ethernet controller.

Version
5.1.1

License

Copyright 2015 Silicon Labs, Inc. 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.

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  KSZ8851SLN_mib_s
 The MIB (Management Information Base) Counters that the ksz8851snl device expose to the host. More...
 

Macros

#define KSZ8851SNL_INT_ENABLE_MASK
 
#define KSZ8851SNL_INT_ENERGY   0x0004
 
#define KSZ8851SNL_INT_LINK_CHANGE   0x8000
 
#define KSZ8851SNL_INT_LINKUP   0x0008
 
#define KSZ8851SNL_INT_MAGIC   0x0010
 
#define KSZ8851SNL_INT_RX_DONE   0x2000
 
#define KSZ8851SNL_INT_RX_OVERRUN   0x0800
 
#define KSZ8851SNL_INT_RX_STOPPED   0x0100
 
#define KSZ8851SNL_INT_RX_WOL_FRAME   0x0020
 
#define KSZ8851SNL_INT_SPI_ERROR   0x0002
 
#define KSZ8851SNL_INT_TX_DONE   0x4000
 
#define KSZ8851SNL_INT_TX_SPACE   0x0040
 
#define KSZ8851SNL_INT_TX_STOPPED   0x0200
 

Typedefs

typedef struct KSZ8851SLN_mib_s KSZ8851SLN_mib_t
 The MIB (Management Information Base) Counters that the ksz8851snl device expose to the host.
 

Functions

void KSZ8851SNL_AllRegistersDump (void)
 Prints the value of the registers of the ethernet controller. More...
 
void KSZ8851SNL_Enable (void)
 Enable RX and TX.
 
uint16_t KSZ8851SNL_FrameCounterGet (void)
 FrameCounter.
 
void KSZ8851SNL_FrameCounterSet (void)
 FrameCounter.
 
void KSZ8851SNL_Init (void)
 Initialize the registers of the ethernet controller.
 
void KSZ8851SNL_IntClear (uint16_t flags)
 Clear interrupt flags. More...
 
void KSZ8851SNL_IntDisable (void)
 disables the chip interrupts
 
void KSZ8851SNL_IntEnable (void)
 enables the chip interrupts
 
uint16_t KSZ8851SNL_IntGet (void)
 Get interrupt flags.
 
void KSZ8851SNL_MacAddressGet (uint8_t *macAddress)
 Get the MAC address of the current board. More...
 
void KSZ8851SNL_MIBCountersDump (void)
 Dumps the Management Information Base Counters. More...
 
void KSZ8851SNL_MIBCountersUpdate (void)
 Update the Management Information Base Counters. More...
 
uint16_t KSZ8851SNL_PHYStatusGet (void)
 Get the PHY status.
 
void KSZ8851SNL_PMECRStatusClear (uint16_t flags)
 Clear PMECR (Power Management Event Control Register) flags. More...
 
uint16_t KSZ8851SNL_Receive (uint16_t length, uint8_t *buffer)
 Performs the actual receive of a raw frame over the network. More...
 
void KSZ8851SNL_RegistersDump (void)
 Prints the value of the registers of the ethernet controller. More...
 
uint16_t KSZ8851SNL_RXQCRGet (void)
 Get RXQCR register.
 
void KSZ8851SNL_RxQueueReset (void)
 Reset RxQueue.
 
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 a partial chunk of an ethernet frame. More...
 
bool KSZ8851SNL_TransmitBegin (uint16_t length)
 Prepares for a transmission of an ethernet frame over the network. More...
 
void KSZ8851SNL_TransmitEnd (uint16_t length)
 Ends a transmission of an ethernet frame to the ethernet controller. More...
 
void KSZ8851SNL_TxQueueReset (void)
 Reset TxQueue.