Versions Compared

Key

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

...

NetDev_MII_Rd()

Anchor11111291111129The next function to implement is the (R)MII read/Phy_RegRd() function. This function is generally implemented within the Ethernet device driver file, since (R)MII bus reads are generally associated with the MAC device. In the case that the PHY communication mechanism is separate from the MAC, then a handler function may be provided within the net_bsp.c file and called from the device driver file instead.anchor

11108061110806Note: This function must be implemented with a timeout and should not block indefinitely should the PHY fail to respond. Anchor11108071110807

Files

Anchor11065281106528Every device driver’s net_dev.canchor10973701097370

Prototype

anchor 11233801123380

 

...

rowspan2

...

1110703Note that since every device driver’s Phy_RegRd()/MII_Rd() function is accessed only by function pointer via the device driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static’static. Anchor11107041110704

Arguments

Anchor11107881110788pif Anchor11320631132063

Pointer to the interface to read a (R)MII PHY register.

...

1110828phy_addr Anchor11320651132065

The bus address of the PHY.

...

reg_addr Anchor11320671132067

The MII register number to read.

Anchor11108301110830p_data Anchor11320691132069

Pointer to a address to store the content of the PHY register being read.

...

1110843perr Anchor11320711132071

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

...

Returned Value

...

1110845None. Anchor11108461110846

Required Configuration

...

11108471110847None. Anchor10968001096800

Notes/Warnings

...

None.