Driver for Micrel KSZ8851SNL ethernet controller. More...
#include "ksz8851snl.h"
#include <stdint.h>
#include <stdbool.h>
#include "ethspi.h"
#include "em_gpio.h"
#include <stdio.h>
Go to the source code of this file.
Functions | |
void | KSZ8851SNL_EnableInterupts (void) |
enables the chip interrupts | |
uint16_t | KSZ8851SNL_CheckIrqStat (void) |
Checks for any interrrupts and if found, clears their status and prepair for interrupt handler routines. | |
uint16_t | KSZ8851SNL_CurrFrameSize (void) |
Returns the size of the currently received frame. | |
static uint8_t | KSZ8851SNL_DwordAllignDiff (uint8_t val) |
Returns the difference in bytes to be DWORD alligned. | |
static void | KSZ8851SNL_ExceptionHandler (enum exceptionType_e exc_type, char *param) |
Prints a message with a predetermined exception level Support method used for debugging. | |
void | KSZ8851SNL_ReadMIBCounters (char *param) |
Dumps the Management Information Base Counters. | |
void | KSZ8851SNL_Init (void) |
Initialize the registers of the ethernet controller. | |
void | KSZ8851SNL_Send (uint16_t pTXLength, uint8_t *pTXData) |
Performs the actual transmit of a raw frame over the network. | |
void | KSZ8851SNL_InitiateLongTransmit (uint16_t pTXLength) |
Performs the initialisation of the transmission of a long raw frame over the network. | |
void | KSZ8851SNL_LongTransmit (uint16_t pTXLength, uint8_t *pTXData) |
Performs the actual transmission of a long raw frame over the network. | |
void | KSZ8851SNL_TerminateLongTransmit (uint16_t pTXLength, uint8_t *pTXData) |
Performs the clean up procedures after the transmission of a long raw frame over the network. | |
static void | KSZ8851SNL_ReleaseIncosistentFrame (void) |
Realease the current frame if it is inconsistent. | |
uint16_t | KSZ8851SNL_Receive (uint8_t *pRXData, uint16_t *pRXLength) |
Performs the actual receive of a raw frame over the network. | |
void | KSZ8851SNL_GetMacAddress (uint8_t *macAddress) |
Get the MAC address of the current board. |
Driver for Micrel KSZ8851SNL ethernet controller.
(C) Copyright 2014 Silicon Labs, http://www.silabs.com
This file is licensensed 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.c.
static uint8_t KSZ8851SNL_DwordAllignDiff | ( | uint8_t | val | ) | [static] |
Returns the difference in bytes to be DWORD alligned.
val | value that needs to be alligned |
Definition at line 199 of file ksz8851snl.c.
Referenced by KSZ8851SNL_Send(), and KSZ8851SNL_TerminateLongTransmit().
static void KSZ8851SNL_ExceptionHandler | ( | enum exceptionType_e | exc_type, | |
char * | param | |||
) | [static] |
Prints a message with a predetermined exception level Support method used for debugging.
exc_type | the exception level | |
param | the printed string |
Definition at line 216 of file ksz8851snl.c.
References DEBUG_PRINT, ETHSPI_WriteRegister(), INT_ENABLE_REG, INT_MASK_EXAMPLE, and NO_INT.
Referenced by KSZ8851SNL_Init(), KSZ8851SNL_InitiateLongTransmit(), KSZ8851SNL_ReleaseIncosistentFrame(), and KSZ8851SNL_Send().
static void KSZ8851SNL_ReleaseIncosistentFrame | ( | void | ) | [static] |
Realease the current frame if it is inconsistent.
Definition at line 720 of file ksz8851snl.c.
References ETHSPI_ReadRegister(), ETHSPI_WriteRegister(), KSZ8851SNL_ExceptionHandler(), RXQ_CMD_REG, and RXQ_RELEASE_CUR_FR.
Referenced by KSZ8851SNL_Receive().