Skip to content

Commit

Permalink
net: openthread: implement otPlatRadioSetRxOnWhenIdle
Browse files Browse the repository at this point in the history
OpenThread upmerge to commit `193e77e`.

Implement `otPlatRadioSetRxOnWhenIdle` radio platform API.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
  • Loading branch information
edmont committed Nov 14, 2023
1 parent 021602c commit f42b246
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions modules/openthread/platform/radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,26 @@ otRadioCaps otPlatRadioGetCaps(otInstance *aInstance)
caps |= OT_RADIO_CAPS_RECEIVE_TIMING;
}

if (radio_caps & IEEE802154_RX_ON_WHEN_IDLE) {
caps |= OT_RADIO_CAPS_RX_ON_WHEN_IDLE;
}

return caps;
}

void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aRxOnWhenIdle)
{
struct ieee802154_config config = {
.rx_on_when_idle = aRxOnWhenIdle
};

ARG_UNUSED(aInstance);

LOG_DBG("RxOnWhenIdle=%d", aRxOnWhenIdle ? 1 : 0);

radio_api->configure(radio_dev, IEEE802154_CONFIG_RX_ON_WHEN_IDLE, &config);
}

bool otPlatRadioGetPromiscuous(otInstance *aInstance)
{
ARG_UNUSED(aInstance);
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ manifest:
revision: 214f9fc1539f8e5937c0474cb6ee29b6dcb2d4b8
path: modules/lib/open-amp
- name: openthread
revision: 6edb06e4e0472411200ce2a084a783eaf3faffe3
revision: 193e77e40ec2387d458eaebd1e03902d86f484a5
path: modules/lib/openthread
- name: percepio
path: modules/debug/percepio
Expand Down

0 comments on commit f42b246

Please sign in to comment.