Merge branch 'support/openthread_radio_caps_rx_on_when_idle' into 'master'

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

See merge request espressif/esp-idf!28583
This commit is contained in:
Shu Chen 2024-01-26 08:09:15 +08:00
commit e358506118
4 changed files with 16 additions and 4 deletions

View File

@ -387,6 +387,7 @@ static IRAM_ATTR void next_operation(void)
enable_rx(); enable_rx();
} else { } else {
ieee802154_set_state(IEEE802154_STATE_IDLE); ieee802154_set_state(IEEE802154_STATE_IDLE);
ieee802154_sleep();
} }
} }
} }

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -347,7 +347,7 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance)
otRadioCaps otPlatRadioGetCaps(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_TRANSMIT_SEC | OT_RADIO_CAPS_RECEIVE_TIMING | OT_RADIO_CAPS_TRANSMIT_TIMING |
OT_RADIO_CAPS_ACK_TIMEOUT | OT_RADIO_CAPS_SLEEP_TO_TX); OT_RADIO_CAPS_ACK_TIMEOUT | OT_RADIO_CAPS_SLEEP_TO_TX);
} }
@ -774,3 +774,9 @@ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aCh
return OT_ERROR_NONE; return OT_ERROR_NONE;
} }
void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable)
{
OT_UNUSED_VARIABLE(aInstance);
esp_ieee802154_set_rx_when_idle(aEnable);
}

View File

@ -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 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -412,3 +412,8 @@ otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance, otLinkMetrics a
return s_radio.ConfigureEnhAckProbing(aLinkMetrics, aShortAddress, *aExtAddress); return s_radio.ConfigureEnhAckProbing(aLinkMetrics, aShortAddress, *aExtAddress);
} }
#endif #endif
void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable)
{
s_radio.SetRxOnWhenIdle(aEnable);
}

View File

@ -1,7 +1,7 @@
## IDF Component Manager Manifest File ## IDF Component Manager Manifest File
dependencies: dependencies:
espressif/esp_ot_cli_extension: espressif/esp_ot_cli_extension:
version: "~0.4.0" version: "~1.0.0"
idf: idf:
version: ">=4.1.0" version: ">=4.1.0"
iperf: iperf: