mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
cpu/sam0/periph: remove bitfield usage in GMAC driver
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
This commit is contained in:
parent
9d298137d6
commit
1140241128
@ -132,7 +132,7 @@ unsigned sam0_read_phy(uint8_t phy, uint8_t addr)
|
||||
| GMAC_MAN_OP(PHY_READ_OP);
|
||||
|
||||
/* Wait for operation completion */
|
||||
while (!GMAC->NSR.bit.IDLE) {}
|
||||
while (!(GMAC->NSR.reg & GMAC_NSR_IDLE)) {}
|
||||
/* return content of shift register */
|
||||
return (GMAC->MAN.reg & GMAC_MAN_DATA_Msk);
|
||||
}
|
||||
@ -148,7 +148,7 @@ void sam0_write_phy(uint8_t phy, uint8_t addr, uint16_t data)
|
||||
| GMAC_MAN_CLTTO | GMAC_MAN_DATA(data);
|
||||
|
||||
/* Wait for operation completion */
|
||||
while (!GMAC->NSR.bit.IDLE) {}
|
||||
while (!(GMAC->NSR.reg & GMAC_NSR_IDLE)) {}
|
||||
}
|
||||
|
||||
void sam0_eth_poweron(void)
|
||||
|
Loading…
Reference in New Issue
Block a user