Writes a value to 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. \param ui16Value is the value to write to the register. When using the internal PHY or when connected to an external PHY supporting extended registers, this
| 2999 | // |
| 3000 | //***************************************************************************** |
| 3001 | void |
| 3002 | EMACPHYExtendedWrite(uint32_t ui32Base, uint8_t ui8PhyAddr, |
| 3003 | uint16_t ui16RegAddr, uint16_t ui16Value) |
| 3004 | { |
| 3005 | // |
| 3006 | // Parameter sanity check. |
| 3007 | // |
| 3008 | ASSERT(ui8PhyAddr < 32); |
| 3009 | ASSERT(ui32Base == EMAC0_BASE); |
| 3010 | |
| 3011 | // |
| 3012 | // Set the address of the register we're about to write. |
| 3013 | // |
| 3014 | EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_REGCTL, 0x001F); |
| 3015 | EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_ADDAR, ui16RegAddr); |
| 3016 | |
| 3017 | // |
| 3018 | // Write the extended register. |
| 3019 | // |
| 3020 | EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_REGCTL, 0x401F); |
| 3021 | EMACPHYWrite(EMAC0_BASE, ui8PhyAddr, EPHY_ADDAR, ui16Value); |
| 3022 | } |
| 3023 | |
| 3024 | //***************************************************************************** |
| 3025 | // |
nothing calls this directly
no test coverage detected