Reads from 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. When connected to an external PHY supporting extended registers, this this function returns the contents of the MMD register specified by \e u
| 4954 | // |
| 4955 | //***************************************************************************** |
| 4956 | uint16_t |
| 4957 | EMACPHYMMDRead(uint32_t ui32Base, uint8_t ui8PhyAddr, uint16_t ui16RegAddr) |
| 4958 | { |
| 4959 | // |
| 4960 | // Parameter sanity check. |
| 4961 | // |
| 4962 | ASSERT(ui8PhyAddr < 32); |
| 4963 | |
| 4964 | // |
| 4965 | // Set the address of the register we're about to read. |
| 4966 | // |
| 4967 | EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_REGCTL, DEV_ADDR(ui16RegAddr)); |
| 4968 | EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_ADDAR, REG_ADDR(ui16RegAddr)); |
| 4969 | |
| 4970 | // |
| 4971 | // Read the extended register value. |
| 4972 | // |
| 4973 | EMACPHYWrite(ui32Base, ui8PhyAddr, EPHY_REGCTL, |
| 4974 | (0x4000 | DEV_ADDR(ui16RegAddr))); |
| 4975 | return(EMACPHYRead(ui32Base, ui8PhyAddr, EPHY_ADDAR)); |
| 4976 | } |
| 4977 | |
| 4978 | //***************************************************************************** |
| 4979 | // |
no test coverage detected