MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- -------------------------------------------------------- 1.01a ecm 01/31/04 First release 1.11a mta 03/21/07 Updated to new coding style 1.11a ecm 05/18/07 Updated the TxBufferAvailable routine to look at both the active and busy bits 1.13a sv 02/1/08 Updated the TxBufferAvailable routine to return busy status properly 2.00a ktn 02/16/09 Added support for MDIO 2.01a ktn 07/20/09 Modified XEmacLite_Send function to use Ping buffers Interrupt enable bit since this alone is used to enable the interrupts for both Ping and Pong Buffers. 3.00a ktn 10/22/09 Updated driver to use the HAL APIs/macros. The macros have been renamed to remove _m from the name. 3.01a ktn 07/08/10 The macro XEmacLite_GetReceiveDataLength is changed to a static function. Updated the XEmacLite_GetReceiveDataLength and XEmacLite_Recv functions to support little endian MicroBlaze. 3.02a sdm 07/22/11 Removed redundant code in XEmacLite_Recv functions for CR617290 3.04a srt 04/13/13 Removed warnings (CR 705000).
#include "xil_io.h"
#include "xenv.h"
#include "xemaclite.h"
#include "xemaclite_i.h"
Functions | |
int | XEmacLite_CfgInitialize (XEmacLite *InstancePtr, XEmacLite_Config *EmacLiteConfigPtr, u32 EffectiveAddr) |
int | XEmacLite_Send (XEmacLite *InstancePtr, u8 *FramePtr, unsigned ByteCount) |
u16 | XEmacLite_Recv (XEmacLite *InstancePtr, u8 *FramePtr) |
void | XEmacLite_SetMacAddress (XEmacLite *InstancePtr, u8 *AddressPtr) |
void | StubHandler (void *CallBackRef) |
int | XEmacLite_TxBufferAvailable (XEmacLite *InstancePtr) |
void | XEmacLite_FlushReceive (XEmacLite *InstancePtr) |
int | XEmacLite_PhyRead (XEmacLite *InstancePtr, u32 PhyAddress, u32 RegNum, u16 *PhyDataPtr) |
int | XEmacLite_PhyWrite (XEmacLite *InstancePtr, u32 PhyAddress, u32 RegNum, u16 PhyData) |
void | XEmacLite_EnableLoopBack (XEmacLite *InstancePtr) |
void | XEmacLite_DisableLoopBack (XEmacLite *InstancePtr) |
|
This is a stub for the send and receive callbacks. The stub is here in case the upper layers forget to set the handlers.
|
|
Initialize a specific XEmacLite instance/driver. The initialization entails:
The driver defaults to polled mode operation.
|
|
Disable Internal loop back functionality.
|
|
Enable Internal loop back functionality.
|
|
Flush the Receive buffers. All data will be lost.
|
|
Read the specified PHY register.
|
|
Write the given data to the specified register in the PHY device.
|
|
Receive a frame. Intended to be called from the interrupt context or with a wrapper which waits for the receive frame to be available.
|
|
Send an Ethernet frame. The ByteCount is the total frame size, including header.
|
|
Set the MAC address for this device. The address is a 48-bit value.
|
|
Determine if there is a transmit buffer available.
|