mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 14:17:47 +00:00
[api] do not include config.h in public api/platform header files (#2168)
This commit is contained in:
committed by
Jonathan Hui
parent
ab4073980f
commit
632e6913c0
@@ -35,7 +35,6 @@
|
||||
#ifndef OPENTHREAD_CHILD_SUPERVISION_H_
|
||||
#define OPENTHREAD_CHILD_SUPERVISION_H_
|
||||
|
||||
#include <openthread/config.h>
|
||||
|
||||
#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
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#ifndef OPENTHREAD_COAP_H_
|
||||
#define OPENTHREAD_COAP_H_
|
||||
|
||||
#include <openthread/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <openthread/message.h>
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#ifndef OPENTHREAD_DNS_H_
|
||||
#define OPENTHREAD_DNS_H_
|
||||
|
||||
#include <openthread/config.h>
|
||||
|
||||
#include <openthread/message.h>
|
||||
#include <openthread/types.h>
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -35,15 +35,12 @@
|
||||
#ifndef OPENTHREAD_JAM_DETECTION_H_
|
||||
#define OPENTHREAD_JAM_DETECTION_H_
|
||||
|
||||
#include <openthread/config.h>
|
||||
|
||||
#include <openthread/types.h>
|
||||
|
||||
#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
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <openthread/config.h>
|
||||
#include <openthread/types.h>
|
||||
|
||||
#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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#ifndef OPENTHREAD_TMF_PROXY_H_
|
||||
#define OPENTHREAD_TMF_PROXY_H_
|
||||
|
||||
#include <openthread/config.h>
|
||||
|
||||
#include <openthread/types.h>
|
||||
|
||||
#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.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#ifndef OPENTHREAD_TYPES_H_
|
||||
#define OPENTHREAD_TYPES_H_
|
||||
|
||||
#include <openthread/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#ifdef OTDLL
|
||||
|
||||
Reference in New Issue
Block a user