emaclite
Vitis Drivers API Documentation
|
Defines common data types, prototypes, and includes the proper headers for use with the EmacLite example code residing in this directory.
This file along with xemaclite_example_util.c are utilized with the specific example code in the other source code files provided.
These examples are designed to be compiled and utilized within the EDK standalone BSP development environment. The readme file contains more information on build requirements needed by these examples.
MODIFICATION HISTORY:
Ver Who Date Changes
2.00a ktn 04/13/09 First release 3.03a bss 09/01/12 Moved the declarations of RecvFrameLength TransmitComplete, EmacLiteInstance, TxFrame[XEL_MAX_FRAME_SIZE], RxFrame[XEL_MAX_FRAME_SIZE]; to xemaclite_example_util.c for fixing C++ compilation errors
Functions | |
void | EmacLitePhyDelay (unsigned int Seconds) |
For PPC we use a usleep call, for Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary. More... | |
u32 | EmacLitePhyDetect (XEmacLite *InstancePtr) |
This function detects the PHY address by looking for successful MII status register contents (PHY register 1). More... | |
int | EmacLiteEnablePhyLoopBack (XEmacLite *InstancePtr, u32 PhyAddress) |
This function enables the MAC loopback on the PHY. More... | |
int | EmacLiteDisablePhyLoopBack (XEmacLite *InstancePtr, u32 PhyAddress) |
This function disables the MAC loopback on the PHY. More... | |
int EmacLiteDisablePhyLoopBack | ( | XEmacLite * | InstancePtr, |
u32 | PhyAddress | ||
) |
This function disables the MAC loopback on the PHY.
InstancePtr | is the pointer to the instance of EmacLite driver. |
PhyAddress | is the address of the Phy device. |
References XEmacLite_PhyRead(), and XEmacLite_PhyWrite().
Referenced by EmacLiteIntrExample(), EmacLitePhyLoopbackExample(), and EmacLitePolledExample().
int EmacLiteEnablePhyLoopBack | ( | XEmacLite * | InstancePtr, |
u32 | PhyAddress | ||
) |
This function enables the MAC loopback on the PHY.
InstancePtr | is the pointer to the instance of EmacLite driver. |
PhyAddress | is the address of the Phy device. |
References EmacLitePhyDelay(), and XEmacLite_PhyWrite().
Referenced by EmacLiteIntrExample(), EmacLitePhyLoopbackExample(), and EmacLitePolledExample().
void EmacLitePhyDelay | ( | unsigned int | Seconds | ) |
For PPC we use a usleep call, for Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary.
Just keep in mind that after resetting or updating the PHY modes, the PHY typically needs time to recover.
Referenced by EmacLiteEnablePhyLoopBack().
u32 EmacLitePhyDetect | ( | XEmacLite * | InstancePtr | ) |
This function detects the PHY address by looking for successful MII status register contents (PHY register 1).
It looks for a PHY that supports auto-negotiation and 10Mbps full-duplex and half-duplex. So, this code won't work for PHYs that don't support those features, but it's a bit more general purpose than matching a specific PHY manufacturer ID.
Note also that on some (older) Xilinx ML4xx boards, PHY address 0 does not properly respond to this query. But, since the default is 0 and assuming no other address responds, then it seems to work OK.
InstancePtr | is the pointer to the instance of EmacLite driver. |
References XEmacLite_PhyRead().
Referenced by EmacLiteIntrExample(), EmacLitePhyLoopbackExample(), and EmacLitePolledExample().