Skip to content

Commit 02ae5d8

Browse files
edmontanangl
authored andcommitted
[nrf fromtree] 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. (cherry picked from commit 01b0d87) Signed-off-by: Eduardo Montoya <[email protected]>
1 parent 3758bcb commit 02ae5d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/ieee802154/ieee802154_nrf5.c

+4
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,10 @@ static int nrf5_configure(const struct device *dev,
995995
case IEEE802154_CONFIG_RX_ON_WHEN_IDLE:
996996
nrf_802154_rx_on_when_idle_set(config->rx_on_when_idle);
997997
nrf5_data.rx_on_when_idle = config->rx_on_when_idle;
998+
999+
if (config->rx_on_when_idle == false) {
1000+
(void)nrf_802154_sleep_if_idle();
1001+
}
9981002
break;
9991003

10001004
default:

0 commit comments

Comments
 (0)