lwip 1.4 - DM9161A PHY

Embed: (wiki syntax)

« Back to documentation index

PHY status and control for the DM9161A.

PHY status and control for the DM9161A.

Various functions for controlling and monitoring the status of the DM9161A PHY. More...

Functions

static s32_t lpc_update_phy_sts (struct netif *netif, u32_t linksts, u32_t sdsts)
 Update PHY status from passed value.
err_t lpc_phy_init (struct netif *netif, int rmii)
 Initialize the DM9161A PHY.

Variables

static PHY_STATUS_TYPE physts
 PHY update flags.
static PHY_STATUS_TYPE olddphysts
 Last PHY update flags, used for determing if something has changed.
static s32_t phyustate
 PHY update counter for state machine.

Detailed Description

Various functions for controlling and monitoring the status of the DM9161A PHY.

In polled (standalone) systems, the PHY state must be monitored as part of the application. In a threaded (RTOS) system, the PHY state is monitored by the PHY handler thread. The MAC driver will not transmit unless the PHY link is active.


Function Documentation

err_t lpc_phy_init ( struct netif *  netif,
int  rmii 
)

Initialize the DM9161A PHY.

This function initializes the DM9161A PHY. It will block until complete. This function is called as part of the EMAC driver initialization. Configuration of the PHY at startup is controlled by setting up configuration defines in lpc_phy.h.

Parameters:
[in]netifNETIF structure
[in]rmiiIf set, configures the PHY for RMII mode
Returns:
ERR_OK if the setup was successful, otherwise ERR_TIMEOUT

Definition at line 319 of file lpc_phy_DM9161A.c.

static s32_t lpc_update_phy_sts ( struct netif *  netif,
u32_t  linksts,
u32_t  sdsts 
) [static]

Update PHY status from passed value.

This function updates the current PHY status based on the passed PHY status word. The PHY status indicate if the link is active, the connection speed, and duplex.

Parameters:
[in]netifNETIF structure
[in]linkstsStatus word with link state
[in]sdstsStatus word with speed and duplex states
Returns:
1 if the status has changed, otherwise 0

Definition at line 234 of file lpc_phy_DM9161A.c.


Variable Documentation

PHY_STATUS_TYPE olddphysts [static]

Last PHY update flags, used for determing if something has changed.

Definition at line 218 of file lpc_phy_DM9161A.c.

PHY_STATUS_TYPE physts [static]

PHY update flags.

Definition at line 215 of file lpc_phy_DM9161A.c.

s32_t phyustate [static]

PHY update counter for state machine.

Definition at line 221 of file lpc_phy_DM9161A.c.