Skip to content

Commit 1b2530d

Browse files
committed
fix(openthread): Include Openthread guarding
1 parent 3e11343 commit 1b2530d

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

libraries/OpenThread/src/OThreadCLI.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,5 @@ void OpenThreadCLI::flush() {
421421

422422

423423
OpenThreadCLI OThreadCLI;
424-
#endif // SOC_IEEE802154_SUPPORTED
424+
425+
#endif /* SOC_IEEE802154_SUPPORTED */

libraries/OpenThread/src/OThreadCLI.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#include "esp_openthread_netif_glue.h"
99
#include "esp_openthread_types.h"
1010

11+
#include "sdkconfig.h"
12+
#if CONFIG_OPENTHREAD_ENABLED
13+
1114
#include "openthread/cli.h"
1215
#include "openthread/instance.h"
1316
#include "openthread/logging.h"
@@ -49,5 +52,5 @@ class OpenThreadCLI : public Stream {
4952
};
5053

5154
extern OpenThreadCLI OThreadCLI;
52-
53-
#endif // SOC_IEEE802154_SUPPORTED
55+
#endif /* CONFIG_OPENTHREAD_ENABLED */
56+
#endif /* SOC_IEEE802154_SUPPORTED */

libraries/OpenThread/src/OThreadCLI_Util.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,4 @@ bool otExecCommand(const char *cmd, const char *arg, ot_cmd_return_t *returnCode
7070
return false;
7171
}
7272
}
73-
74-
#endif // SOC_IEEE802154_SUPPORTED
73+
#endif /* SOC_IEEE802154_SUPPORTED */

libraries/OpenThread/src/OThreadCLI_Util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ ot_device_role_t getOtDeviceRole();
1919
const char* getStringOtDeviceRole();
2020
bool otExecCommand(const char *cmd, const char *arg, ot_cmd_return_t *returnCode = NULL);
2121

22-
#endif
22+
#endif /* SOC_IEEE802154_SUPPORTED */

0 commit comments

Comments
 (0)