[bsp][stm32] eth driver support phy YT8512C

This commit is contained in:
刘伟 2024-03-15 15:22:40 +08:00 committed by Meco Man
parent bef4bbd50a
commit 0ff23d8951
1 changed files with 4 additions and 0 deletions

View File

@ -500,7 +500,11 @@ static void phy_monitor_thread_entry(void *parameter)
EthHandle.Init.PhyAddress = i; EthHandle.Init.PhyAddress = i;
HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ID1_REG, (uint32_t *)&temp); HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ID1_REG, (uint32_t *)&temp);
#ifdef PHY_USING_YT8512C
if (temp != 0xFFFF)
#else
if (temp != 0xFFFF && temp != 0x00) if (temp != 0xFFFF && temp != 0x00)
#endif /* PHY_USING_YT8512C */
{ {
phy_addr = i; phy_addr = i;
break; break;