1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/sam0_eth: disable PHY when MAC is sleeping

- idle         13.88 mA
 - MAC off      11.48 mA
 - MAC+PHY off  10.73 mA
This commit is contained in:
Benjamin Valentin 2023-05-31 14:08:50 +02:00
parent d742513b62
commit 385d260069

View File

@ -124,11 +124,17 @@ void sam0_eth_poweron(void)
{
_enable_clock();
sam0_clear_rx_buffers();
/* enable PHY */
gpio_set(sam_gmac_config[0].rst_pin);
_is_sleeping = false;
}
void sam0_eth_poweroff(void)
{
/* disable PHY */
gpio_clear(sam_gmac_config[0].rst_pin);
_is_sleeping = true;
_disable_clock();
}