...
NetPhy_LinkStateSet()
Anchor
LinkStateSet()
function determines the current Ethernet link state. Results are passed back to the caller within a NET_DEV_LINK_ETHER
structure which contains fields for link speed and duplex. This function is called periodically by µC/TCP-IP.Files
...
net_phy.c
Prototype
anchor
...
rowspan | 2 |
---|
...
Anchor
LinkStateSet()
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’‘static
’.Arguments
Anchor
pif
Pointer to the interface to set a PHY’s current link state.
...
plink_state
anchor
Pointer to a link state structure with link state information to configure. The NET_DEV_LINK_ETHER
structure contains two fields for link speed and duplex. Link speed is set via plink_state->Spd
:
...
...
NET_PHY_SPD_10
...
NET_PHY_SPD_100
...
...
...
And link duplex is set via plink_state->Duplex
:
...
NET_PHY_DUPLEX_HALF
...
NET_PHY_DUPLEX_FULL
...
...
Anchor
perr
Pointer to variable that will receive the return error code from this function.
...
...
Returned Value
...
None. Anchor
Required Configuration
Anchor
Notes/Warnings
...
None.