Skip to content

Commit

Permalink
Merge branch 'support/openthread_radio_caps_rx_on_when_idle' into 'ma…
Browse files Browse the repository at this point in the history
…ster'

feat(openthread): support openthread radio caps rx on when idle

See merge request espressif/esp-idf!28583
  • Loading branch information
chshu committed Jan 26, 2024
2 parents a68013c + 265531c commit e358506
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions components/ieee802154/driver/esp_ieee802154_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ static IRAM_ATTR void next_operation(void)
enable_rx();
} else {
ieee802154_set_state(IEEE802154_STATE_IDLE);
ieee802154_sleep();
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions components/openthread/src/port/esp_openthread_radio.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -347,7 +347,7 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance)

otRadioCaps otPlatRadioGetCaps(otInstance *aInstance)
{
return (otRadioCaps)(OT_RADIO_CAPS_ENERGY_SCAN |
return (otRadioCaps)(OT_RADIO_CAPS_ENERGY_SCAN | OT_RADIO_CAPS_RX_ON_WHEN_IDLE |
OT_RADIO_CAPS_TRANSMIT_SEC | OT_RADIO_CAPS_RECEIVE_TIMING | OT_RADIO_CAPS_TRANSMIT_TIMING |
OT_RADIO_CAPS_ACK_TIMEOUT | OT_RADIO_CAPS_SLEEP_TO_TX);
}
Expand Down Expand Up @@ -774,3 +774,9 @@ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aCh

return OT_ERROR_NONE;
}

void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable)
{
OT_UNUSED_VARIABLE(aInstance);
esp_ieee802154_set_rx_when_idle(aEnable);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -412,3 +412,8 @@ otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance, otLinkMetrics a
return s_radio.ConfigureEnhAckProbing(aLinkMetrics, aShortAddress, *aExtAddress);
}
#endif

void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable)
{
s_radio.SetRxOnWhenIdle(aEnable);
}
2 changes: 1 addition & 1 deletion examples/openthread/ot_cli/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp_ot_cli_extension:
version: "~0.4.0"
version: "~1.0.0"
idf:
version: ">=4.1.0"
iperf:
Expand Down

0 comments on commit e358506

Please sign in to comment.