提交 d01e0e98 编写于 作者: wuyangyong's avatar wuyangyong

format code by Astyle.

上级 cde9139b
...@@ -631,7 +631,7 @@ void ETH_DropRxPkt(void) ...@@ -631,7 +631,7 @@ void ETH_DropRxPkt(void)
uint16_t ETH_ReadPHYRegister(uint16_t PHYAddress, uint16_t PHYReg) uint16_t ETH_ReadPHYRegister(uint16_t PHYAddress, uint16_t PHYReg)
{ {
uint32_t tmpreg = 0; uint32_t tmpreg = 0;
__IO uint32_t timeout = 0; __IO uint32_t timeout = 0;
/* Check the parameters */ /* Check the parameters */
assert_param(IS_ETH_PHY_ADDRESS(PHYAddress)); assert_param(IS_ETH_PHY_ADDRESS(PHYAddress));
assert_param(IS_ETH_PHY_REG(PHYReg)); assert_param(IS_ETH_PHY_REG(PHYReg));
...@@ -652,7 +652,8 @@ __IO uint32_t timeout = 0; ...@@ -652,7 +652,8 @@ __IO uint32_t timeout = 0;
{ {
timeout++; timeout++;
tmpreg = ETH->MACMIIAR; tmpreg = ETH->MACMIIAR;
} while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); }
while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO));
/* Return ERROR in case of timeout */ /* Return ERROR in case of timeout */
if(timeout == PHY_READ_TO) if(timeout == PHY_READ_TO)
{ {
...@@ -701,7 +702,8 @@ uint32_t ETH_WritePHYRegister(uint16_t PHYAddress, uint16_t PHYReg, uint16_t PHY ...@@ -701,7 +702,8 @@ uint32_t ETH_WritePHYRegister(uint16_t PHYAddress, uint16_t PHYReg, uint16_t PHY
{ {
timeout++; timeout++;
tmpreg = ETH->MACMIIAR; tmpreg = ETH->MACMIIAR;
} while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); }
while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO));
/* Return ERROR in case of timeout */ /* Return ERROR in case of timeout */
if(timeout == PHY_WRITE_TO) if(timeout == PHY_WRITE_TO)
{ {
...@@ -2836,7 +2838,8 @@ uint32_t ETH_HandlePTPTxPkt(uint8_t *ppkt, uint16_t FrameLength, uint32_t *PTPTx ...@@ -2836,7 +2838,8 @@ uint32_t ETH_HandlePTPTxPkt(uint8_t *ppkt, uint16_t FrameLength, uint32_t *PTPTx
do do
{ {
timeout++; timeout++;
} while (!(DMATxDescToSet->Status & ETH_DMATxDesc_TTSS) && (timeout < 0xFFFF)); }
while (!(DMATxDescToSet->Status & ETH_DMATxDesc_TTSS) && (timeout < 0xFFFF));
/* Return ERROR in case of timeout */ /* Return ERROR in case of timeout */
if(timeout == PHY_READ_TO) if(timeout == PHY_READ_TO)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册