mirror of
https://github.com/espressif/openthread.git
synced 2026-09-16 22:20:07 +00:00
[channelmask] add radio supported and preferred channel mask (#3732)
Add new radio platform APIs: * otPlatRadioGetSupportedChannelMask(); // supported channel mask: the device is allowed to be on; * otPlatRadioGetPreferredChannelMask(); // preferred channel mask: the device prefers to form on. Implement some default radio platform APIs. Add spinel property `SPINEL_PROP_PHY_CHAN_PREFERRED` to retrieve Preferred ChannelMask.
This commit is contained in:
@@ -821,16 +821,6 @@ OTAPI uint8_t OTCALL otLinkGetPhyChannelMin(otInstance *aInstance);
|
||||
*/
|
||||
OTAPI uint8_t OTCALL otLinkGetPhyChannelMax(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function gets the supported channel mask of IEEE 802.15.4 physical layer.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns The supported channel mask as `uint32_t` with bit 0 (lsb) mapping to channel 0, bit 1 to channel 1, so on.
|
||||
*
|
||||
*/
|
||||
OTAPI uint32_t OTCALL otLinkGetPhySupportedChannelMask(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
@@ -694,6 +694,26 @@ void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance);
|
||||
*/
|
||||
void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Get the radio supported channel mask that the device is allowed to be on.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
*
|
||||
* @returns The radio supported channel mask.
|
||||
*
|
||||
*/
|
||||
uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Get the radio preferred channel mask that the device prefers to form on.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance strucyyture.
|
||||
*
|
||||
* @returns The radio preferred channel mask.
|
||||
*
|
||||
*/
|
||||
uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user