NetPhy_EnDis()
The next Ethernet PHY function is the enable-disable/EnDis()
function. This function is called by the Ethernet network interface layer when an interface is started or stopped.
Files
Every physical layer driver’s net_phy.c
Prototype
static void NetPhy_EnDis (NET_IF *pif, CPU_BOOLEAN en, NET_ERR *perr);
Note that since every PHY driver’s EnDis()
function is accessed only by function pointer via the PHY driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static
’.
Arguments
pif
Pointer to the interface to enable/disable a PHY.
en
A flag representing the next desired state of the PHY:
DEF_ENABLED
DEF_DISABLED
perr
Pointer to variable that will receive the return error code from this function.
Returned Value
None.
Required Configuration
None.
Notes/Warnings
Disabling the PHY will generally cause the PHY to power down which will cause link state to be disconnected.