mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
feat(openthread): support preferred channel mask
This commit is contained in:
@ -360,6 +360,14 @@ menu "OpenThread"
|
|||||||
default 120
|
default 120
|
||||||
endmenu
|
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
|
config OPENTHREAD_NUM_MESSAGE_BUFFERS
|
||||||
int "The number of openthread message buffers"
|
int "The number of openthread message buffers"
|
||||||
default 65
|
default 65
|
||||||
|
@ -798,3 +798,15 @@ void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable)
|
|||||||
esp_ieee802154_set_rx_when_idle(aEnable);
|
esp_ieee802154_set_rx_when_idle(aEnable);
|
||||||
}
|
}
|
||||||
#endif
|
#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;
|
||||||
|
}
|
||||||
|
@ -467,3 +467,17 @@ uint16_t otPlatTimeGetXtalAccuracy(void)
|
|||||||
{
|
{
|
||||||
return CONFIG_OPENTHREAD_XTAL_ACCURACY;
|
return CONFIG_OPENTHREAD_XTAL_ACCURACY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance)
|
||||||
|
{
|
||||||
|
OT_UNUSED_VARIABLE(aInstance);
|
||||||
|
// Refer to `GetRadioChannelMask(bool aPreferred)`: TRUE to get preferred channel mask
|
||||||
|
return s_radio.GetRadioChannelMask(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance)
|
||||||
|
{
|
||||||
|
OT_UNUSED_VARIABLE(aInstance);
|
||||||
|
// Refer to `GetRadioChannelMask(bool aPreferred)`: FALSE to get supported channel mask
|
||||||
|
return s_radio.GetRadioChannelMask(false);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user