diff --git a/include/openthread/child_supervision.h b/include/openthread/child_supervision.h index 1c54db754..9163c9675 100644 --- a/include/openthread/child_supervision.h +++ b/include/openthread/child_supervision.h @@ -35,7 +35,6 @@ #ifndef OPENTHREAD_CHILD_SUPERVISION_H_ #define OPENTHREAD_CHILD_SUPERVISION_H_ -#include #include "openthread/types.h" @@ -43,14 +42,15 @@ extern "C" { #endif -#if OPENTHREAD_ENABLE_CHILD_SUPERVISION - /** * @addtogroup api-child-supervision * * @brief * This module includes functions for child supervision feature. * + * The functions in this module are available when child supervision feature (`OPENTHREAD_ENABLE_CHILD_SUPERVISION`) + * is enabled. + * * @{ * */ @@ -105,8 +105,6 @@ void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout) * */ -#endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION - #ifdef __cplusplus } // extern "C" #endif diff --git a/include/openthread/coap.h b/include/openthread/coap.h index fe9dc1e4d..ab9f44e55 100644 --- a/include/openthread/coap.h +++ b/include/openthread/coap.h @@ -35,8 +35,6 @@ #ifndef OPENTHREAD_COAP_H_ #define OPENTHREAD_COAP_H_ -#include - #include #include @@ -52,6 +50,9 @@ extern "C" { * @brief * This module includes functions that control CoAP communication. * + * The functions in this module are available when application-coap feature (`OPENTHREAD_ENABLE_APPLICATION_COAP`) is + * enabled. + * * @{ * */ @@ -228,7 +229,6 @@ typedef struct otCoapResource struct otCoapResource *mNext; ///< The next CoAP resource in the list } otCoapResource; -#if OPENTHREAD_ENABLE_APPLICATION_COAP /** * This function initializes the CoAP header. * @@ -538,7 +538,6 @@ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandle * */ otError otCoapSendResponse(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo); -#endif // OPENTHREAD_ENABLE_APPLICATION_COAP /** * @} diff --git a/include/openthread/dns.h b/include/openthread/dns.h index 465ccffb9..5abcff74c 100644 --- a/include/openthread/dns.h +++ b/include/openthread/dns.h @@ -35,8 +35,6 @@ #ifndef OPENTHREAD_DNS_H_ #define OPENTHREAD_DNS_H_ -#include - #include #include @@ -90,10 +88,11 @@ typedef struct otDnsQuery typedef void (*otDnsResponseHandler)(void *aContext, const char *aHostname, otIp6Address *aAddress, uint32_t aTtl, otError aResult); -#if OPENTHREAD_ENABLE_DNS_CLIENT /** * This function sends a DNS query for AAAA (IPv6) record. * + * This function is available only if feature `OPENTHREAD_ENABLE_DNS_CLIENT` is enabled. + * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aQuery A pointer to specify DNS query parameters. * @param[in] aHandler A function pointer that shall be called on response reception or time-out. @@ -102,7 +101,6 @@ typedef void (*otDnsResponseHandler)(void *aContext, const char *aHostname, otIp */ otError otDnsClientQuery(otInstance *aInstance, const otDnsQuery *aQuery, otDnsResponseHandler aHandler, void *aContext); -#endif /** * @} diff --git a/include/openthread/jam_detection.h b/include/openthread/jam_detection.h index fa8f59b7b..fdb16d1fe 100644 --- a/include/openthread/jam_detection.h +++ b/include/openthread/jam_detection.h @@ -35,15 +35,12 @@ #ifndef OPENTHREAD_JAM_DETECTION_H_ #define OPENTHREAD_JAM_DETECTION_H_ -#include - #include #ifdef __cplusplus extern "C" { #endif -#if OPENTHREAD_ENABLE_JAM_DETECTION /** * @addtogroup api-jam-detection @@ -51,6 +48,9 @@ extern "C" { * @brief * This module includes functions for signal jamming detection feature. * + * The functions in this module are available when jam-detection feature (`OPENTHREAD_ENABLE_JAM_DETECTION`) is + * enabled. + * * @{ * */ @@ -193,8 +193,6 @@ uint64_t otJamDetectionGetHistoryBitmap(otInstance *aInstance); * */ -#endif // OPENTHREAD_ENABLE_JAM_DETECTION - #ifdef __cplusplus } // extern "C" #endif diff --git a/include/openthread/platform/radio.h b/include/openthread/platform/radio.h index 89201d25d..15ea5c360 100644 --- a/include/openthread/platform/radio.h +++ b/include/openthread/platform/radio.h @@ -38,7 +38,6 @@ #include -#include #include #ifdef __cplusplus @@ -108,10 +107,20 @@ typedef struct otRadioFrame bool mSecurityValid: 1; ///< Security Enabled flag is set and frame passes security checks. bool mDidTX: 1; ///< Set to true if this frame sent from the radio. Ignored by radio driver. bool mIsARetx: 1; ///< Set to true if this frame is a retransmission. Should be ignored by radio driver. -#if OPENTHREAD_ENABLE_RAW_LINK_API - uint32_t mMsec; ///< The timestamp when the frame was received (milliseconds). - uint16_t mUsec; ///< The timestamp when the frame was received (microseconds, the offset to mMsec). -#endif + + /** + * The timestamp when the frame was received (milliseconds). + * Applicable/Required only when raw-link-api feature (`OPENTHREAD_ENABLE_RAW_LINK_API`) is enabled. + * + */ + uint32_t mMsec; + + /** + * The timestamp when the frame was received (microseconds, the offset to mMsec). + * Applicable/Required only when raw-link-api feature (`OPENTHREAD_ENABLE_RAW_LINK_API`) is enabled. + * + */ + uint16_t mUsec; } otRadioFrame; /** diff --git a/include/openthread/tmf_proxy.h b/include/openthread/tmf_proxy.h index 7e6a29a3d..b710d831f 100644 --- a/include/openthread/tmf_proxy.h +++ b/include/openthread/tmf_proxy.h @@ -35,8 +35,6 @@ #ifndef OPENTHREAD_TMF_PROXY_H_ #define OPENTHREAD_TMF_PROXY_H_ -#include - #include #ifdef __cplusplus @@ -49,6 +47,8 @@ extern "C" { * @brief * This module includes functions for TMF proxy feature. * + * The functions in this module are available when tmf-proxy feature (`OPENTHREAD_ENABLE_TMF_PROXY`) is enabled. + * * @{ * */ diff --git a/include/openthread/types.h b/include/openthread/types.h index 9931330e0..9a8eb98c7 100644 --- a/include/openthread/types.h +++ b/include/openthread/types.h @@ -35,8 +35,6 @@ #ifndef OPENTHREAD_TYPES_H_ #define OPENTHREAD_TYPES_H_ -#include - #include #include #ifdef OTDLL