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

Function EMACPHYMMDWrite

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

Writes a value to an extended PHY register in MMD address space. \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. \param ui16Value is the value to write to the register. When uhen connected to an external PHY supporting extended registers in MMD add

Source from the content-addressed store, hash-verified

4915//
4916//*****************************************************************************
4917void
4918EMACPHYMMDWrite(uint32_t ui32Base, uint8_t ui8PhyAddr, uint16_t ui16RegAddr,
4919 uint16_t ui16Data)
4920{
4921 //
4922 // Parameter sanity check.
4923 //
4924 ASSERT(ui8PhyAddr < 32);
4925
4926 //
4927 // Set the address of the register we're about to write.
4928 //
4929 EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_REGCTL, DEV_ADDR(ui16RegAddr));
4930 EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_ADDAR, REG_ADDR(ui16RegAddr));
4931
4932 //
4933 // Write the extended register value.
4934 //
4935 EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_REGCTL,
4936 (0x4000 | DEV_ADDR(ui16RegAddr)));
4937 EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_REGCTL, ui16Data);
4938}
4939
4940//*****************************************************************************
4941//

Callers

nothing calls this directly

Calls 1

EMACPHYWriteFunction · 0.70

Tested by

no test coverage detected