/ * @brief * Write PHY register of Ethernet device * * @details * * @note * * @param[in] addr * Register address * * @param[in] data * Register value ******************************************************************************/
| 330 | * Register value |
| 331 | ******************************************************************************/ |
| 332 | static void efm_eth_writePhy(rt_uint8_t addr, rt_uint16_t data) |
| 333 | { |
| 334 | eth_debug("ETH: *** write PHY %x (%x)\n", addr, data); |
| 335 | |
| 336 | /* Set PHY register address */ |
| 337 | efm_eth_writeReg(MIREGADR, addr); |
| 338 | |
| 339 | /* Set data */ |
| 340 | efm_eth_writeReg(MIWRL, data); |
| 341 | efm_eth_writeReg(MIWRH, data >> 8); |
| 342 | /* Waiting for at least 10.24 uS */ |
| 343 | while(efm_eth_readReg(MISTAT) & MISTAT_BUSY); |
| 344 | } |
| 345 | |
| 346 | /***************************************************************************//** |
| 347 | * @brief |
no test coverage detected