Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NetPhy_LinkStateSet()

Anchor11154911115491The Ethernet PHY’s 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. Anchor11154921115492

Files

...

11154931115493Every physical layer driver’s net_phy.c Anchor11155011115501

Prototype

anchor 11234651123465

 

...

rowspan2

...

Anchor11155021115502Note that since every PHY driver’s 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. Anchor11155031115503

Arguments

Anchor11158421115842pif Anchor11322211132221

Pointer to the interface to set a PHY’s current link state.

...

plink_stateanchor11322231132223

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

...

...

 

Anchor11155061115506perr Anchor11322631132263

Pointer to variable that will receive the return error code from this function.

...

...

Returned Value

...

None. Anchor11155111115511

Required Configuration

Anchor11155121115512None. Anchor11155131115513

Notes/Warnings

...

None.