Skip to content

Commit

Permalink
[nrf fromtree] drivers: ieee802154: nrf5: sleep if idle when RxOnWhen…
Browse files Browse the repository at this point in the history
…Idle=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 <eduardo.montoya@nordicsemi.no>
  • Loading branch information
edmont authored and anangl committed Jun 27, 2024
1 parent 3758bcb commit 02ae5d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ieee802154/ieee802154_nrf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,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:
Expand Down

0 comments on commit 02ae5d8

Please sign in to comment.