XMC Peripheral Library for XMC4000 Family: ETH_PHY

XMC Peripheral Library for XMC4000 Family

XMC Peripheral Library for XMC4000 Family  2.1.16

Data Structures

struct  XMC_ETH_PHY_CONFIG_t
 

Enumerations

Functions

int32_t XMC_ETH_PHY_ExitPowerDown (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 
XMC_ETH_LINK_DUPLEX_t XMC_ETH_PHY_GetLinkDuplex (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 
XMC_ETH_LINK_SPEED_t XMC_ETH_PHY_GetLinkSpeed (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 
XMC_ETH_LINK_STATUS_t XMC_ETH_PHY_GetLinkStatus (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 
int32_t XMC_ETH_PHY_Init (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, const XMC_ETH_PHY_CONFIG_t *const config)
 
bool XMC_ETH_PHY_IsAutonegotiationCompleted (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 
int32_t XMC_ETH_PHY_PowerDown (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 
int32_t XMC_ETH_PHY_Reset (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr)
 

Detailed Description

The XMC_ETH_PHY low level driver provides functions used by XMC_ETH_MAC.

Enumeration Type Documentation

ETH PHY status returns

Enumerator
XMC_ETH_PHY_STATUS_OK 

OK. All is well!

XMC_ETH_PHY_STATUS_BUSY 

Busy

XMC_ETH_PHY_STATUS_ERROR 

Error

XMC_ETH_PHY_STATUS_ERROR_DEVICE_ID 

Error in device identifier

XMC_ETH_PHY_STATUS_ERROR_TIMEOUT 

Time-out error

Function Documentation

int32_t XMC_ETH_PHY_ExitPowerDown ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
int32_t return status XMC_ETH_PHY_STATUS_t
Description:
Exit power down mode
XMC_ETH_LINK_DUPLEX_t XMC_ETH_PHY_GetLinkDuplex ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
XMC_ETH_LINK_DUPLEX_t ETH link duplex settings
Description:
Get link duplex settings
The function reads the physical layer interface and returns the link duplex settings. It returns either XMC_ETH_LINK_DUPLEX_FULL or XMC_ETH_LINK_DUPLEX_HALF.
XMC_ETH_LINK_SPEED_t XMC_ETH_PHY_GetLinkSpeed ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
XMC_ETH_LINK_SPEED_t ETH link speed
Description:
Get link speed
The function reads the physical layer interface and returns the link speed. It returns either XMC_ETH_LINK_SPEED_100M or XMC_ETH_LINK_SPEED_10M.
XMC_ETH_LINK_STATUS_t XMC_ETH_PHY_GetLinkStatus ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
XMC_ETH_LINK_STATUS_t ETH link status
Description:
Get link status
The function reads the physical layer interface and returns the link status. It returns either XMC_ETH_LINK_STATUS_UP or XMC_ETH_LINK_STATUS_DOWN.
int32_t XMC_ETH_PHY_Init ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr,
const XMC_ETH_PHY_CONFIG_t *const  config 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
configA constant pointer to XMC_ETH_PHY_CONFIG_t, pointing to a physical layer config
Returns
int32_t return status XMC_ETH_PHY_STATUS_t
Description:
Initialize the ETH physical layer interface
The function sets the link speed, applies the duplex mode, sets auto-negotiation and loop-back settings.
bool XMC_ETH_PHY_IsAutonegotiationCompleted ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
bool True if autonegotiation process is finished otherwise false
Description:
Get status of autonegotiation
int32_t XMC_ETH_PHY_PowerDown ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
int32_t return status XMC_ETH_PHY_STATUS_t
Description:
Enter power down mode
int32_t XMC_ETH_PHY_Reset ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPhysical address
Returns
int32_t return status XMC_ETH_PHY_STATUS_t
Description:
Reset transciver
Generated on Mon Aug 7 2017 11:33:57 for XMC Peripheral Library for XMC4000 Family by   doxygen 1.8.11