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
| 2959 | // |
| 2960 | //***************************************************************************** |
| 2961 | uint16_t |
| 2962 | EMACPHYExtendedRead(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 | // |
nothing calls this directly
no test coverage detected