mirror of
https://github.com/espressif/openthread.git
synced 2026-09-11 03:30:09 +00:00
[csl] add APIs to retrieve status (#8793)
This commit is contained in:
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (338)
|
||||
#define OPENTHREAD_API_VERSION (339)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -1002,8 +1002,8 @@ void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallba
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval true Promiscuous mode is enabled.
|
||||
* @retval false Promiscuous mode is not enabled.
|
||||
* @retval TRUE Promiscuous mode is enabled.
|
||||
* @retval FALSE Promiscuous mode is not enabled.
|
||||
*
|
||||
*/
|
||||
bool otLinkIsPromiscuous(otInstance *aInstance);
|
||||
@@ -1121,12 +1121,32 @@ otError otLinkSetEnabled(otInstance *aInstance, bool aEnable);
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval true Link layer is enabled.
|
||||
* @retval false Link layer is not enabled.
|
||||
* @retval TRUE Link layer is enabled.
|
||||
* @retval FALSE Link layer is not enabled.
|
||||
*
|
||||
*/
|
||||
bool otLinkIsEnabled(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Indicates whether or not CSL is enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval TRUE Link layer is CSL enabled.
|
||||
* @retval FALSE Link layer is not CSL enabled.
|
||||
*
|
||||
*/
|
||||
bool otLinkIsCslEnabled(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Indicates whether the device is connected to a parent which supports CSL.
|
||||
*
|
||||
* @retval TRUE If parent supports CSL.
|
||||
* @retval FALSE If parent does not support CSL.
|
||||
*
|
||||
*/
|
||||
bool otLinkIsCslSupported(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Instructs the device to send an empty IEEE 802.15.4 data frame.
|
||||
*
|
||||
|
||||
@@ -391,6 +391,10 @@ uint16_t otLinkGetCcaFailureRate(otInstance *aInstance)
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
||||
bool otLinkIsCslEnabled(otInstance *aInstance) { return AsCoreType(aInstance).Get<Mac::Mac>().IsCslEnabled(); }
|
||||
|
||||
bool otLinkIsCslSupported(otInstance *aInstance) { return AsCoreType(aInstance).Get<Mac::Mac>().IsCslSupported(); }
|
||||
|
||||
uint8_t otLinkCslGetChannel(otInstance *aInstance) { return AsCoreType(aInstance).Get<Mac::Mac>().GetCslChannel(); }
|
||||
|
||||
otError otLinkCslSetChannel(otInstance *aInstance, uint8_t aChannel)
|
||||
|
||||
Reference in New Issue
Block a user