...
NetDev_MII_Rd()
Anchor
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.anchorFiles
Anchor
net_dev.c
anchorPrototype
anchor
...
rowspan | 2 |
---|
...
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
’.Arguments
Anchor
pif
Pointer to the interface to read a (R)MII PHY register.
...
phy_addr
The bus address of the PHY.
...
reg_addr
Anchor
The MII register number to read.
Anchor
p_data
Pointer to a address to store the content of the PHY register being read.
...
perr
Pointer to variable that will receive the return error code from this function.
...
Returned Value
...
Required Configuration
...
Notes/Warnings
...
None.