drivers: ieee802154: nrf5: sleep if idle when RxOnWhenIdle=0

When RxOnWhenIdle is set to False, turn the radio off
if no operation is ongoing in order to save power.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
This commit is contained in:
Eduardo Montoya 2024-05-30 08:48:13 +02:00 committed by Henrik Brix Andersen
commit 01b0d8736e

View file

@ -1005,6 +1005,10 @@ static int nrf5_configure(const struct device *dev,
case IEEE802154_CONFIG_RX_ON_WHEN_IDLE:
nrf_802154_rx_on_when_idle_set(config->rx_on_when_idle);
nrf5_data.rx_on_when_idle = config->rx_on_when_idle;
if (config->rx_on_when_idle == false) {
(void)nrf_802154_sleep_if_idle();
}
break;
default: