From 86eed3f3ab270b6f917c3153ac09d085a6aa3e54 Mon Sep 17 00:00:00 2001 From: zwx Date: Thu, 26 Dec 2024 22:03:34 +0800 Subject: [PATCH] feat(openthread): support preferred channel mask --- components/openthread/Kconfig | 8 ++++++++ .../openthread/src/port/esp_openthread_radio.c | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/components/openthread/Kconfig b/components/openthread/Kconfig index f34a3a0228..fdd5445456 100644 --- a/components/openthread/Kconfig +++ b/components/openthread/Kconfig @@ -360,6 +360,14 @@ menu "OpenThread" default 120 endmenu + config OPENTHREAD_PREFERRED_CHANNEL_MASK + hex "Preferred channel mask" + default 0x7fff800 + + config OPENTHREAD_SUPPORTED_CHANNEL_MASK + hex "Supported channel mask" + default 0x7fff800 + config OPENTHREAD_NUM_MESSAGE_BUFFERS int "The number of openthread message buffers" default 65 diff --git a/components/openthread/src/port/esp_openthread_radio.c b/components/openthread/src/port/esp_openthread_radio.c index 7f04d14ac1..e1ea8fc839 100644 --- a/components/openthread/src/port/esp_openthread_radio.c +++ b/components/openthread/src/port/esp_openthread_radio.c @@ -814,3 +814,15 @@ esp_ieee802154_coex_config_t esp_openthread_get_coex_config(void) return esp_ieee802154_get_coex_config(); } #endif + +uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance) +{ + OT_UNUSED_VARIABLE(aInstance); + return CONFIG_OPENTHREAD_PREFERRED_CHANNEL_MASK; +} + +uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance) +{ + OT_UNUSED_VARIABLE(aInstance); + return CONFIG_OPENTHREAD_SUPPORTED_CHANNEL_MASK; +}