MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / EMACPHYExtendedRead

Function EMACPHYExtendedRead

bsp/tm4c129x/libraries/driverlib/emac.c:2961–2982  ·  view source on GitHub ↗

Reads from an extended PHY register. \param ui32Base is the base address of the controller. \param ui8PhyAddr is the physical address of the PHY to access. \param ui16RegAddr is the address of the PHY extended register to be accessed. When using the internal PHY or when connected to an external PHY supporting extended registers, this function returns the contents of the extended PHY register spe

Source from the content-addressed store, hash-verified

2959//
2960//*****************************************************************************
2961uint16_t
2962EMACPHYExtendedRead(uint32_t ui32Base, uint8_t ui8PhyAddr,
2963 uint16_t ui16RegAddr)
2964{
2965 //
2966 // Parameter sanity check.
2967 //
2968 ASSERT(ui8PhyAddr < 32);
2969 ASSERT(ui32Base == EMAC0_BASE);
2970
2971 //
2972 // Set the address of the register we're about to read.
2973 //
2974 EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_REGCTL, 0x001F);
2975 EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_ADDAR, ui16RegAddr);
2976
2977 //
2978 // Read the extended register value.
2979 //
2980 EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_REGCTL, 0x401F);
2981 return(EMACPHYRead(EMAC0_BASE, ui8PhyAddr, EPHY_ADDAR));
2982}
2983
2984//*****************************************************************************
2985//

Callers

nothing calls this directly

Calls 2

EMACPHYWriteFunction · 0.70
EMACPHYReadFunction · 0.70

Tested by

no test coverage detected