From c940fd3cfbaa000480623702014204b2a7fe1800 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Sat, 24 Oct 2020 10:48:13 -0400 Subject: [PATCH] Convert reporting from C to C++ (#3424) --- ...onfiguration.c => reporting-default-configuration.cpp} | 0 src/app/reporting/{reporting.c => reporting.cpp} | 4 ++-- src/app/util/types_stub.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/app/reporting/{reporting-default-configuration.c => reporting-default-configuration.cpp} (100%) rename src/app/reporting/{reporting.c => reporting.cpp} (99%) diff --git a/src/app/reporting/reporting-default-configuration.c b/src/app/reporting/reporting-default-configuration.cpp similarity index 100% rename from src/app/reporting/reporting-default-configuration.c rename to src/app/reporting/reporting-default-configuration.cpp diff --git a/src/app/reporting/reporting.c b/src/app/reporting/reporting.cpp similarity index 99% rename from src/app/reporting/reporting.c rename to src/app/reporting/reporting.cpp index bb52437a3da149..b8f9dd550cc042 100644 --- a/src/app/reporting/reporting.c +++ b/src/app/reporting/reporting.cpp @@ -153,7 +153,7 @@ void emberAfPluginReportingStackStatusCallback(EmberStatus status) } } -void emberAfPluginReportingInitCallback(void) +extern "C" void emberAfPluginReportingInitCallback(void) { // On device initialization, any attributes that have been set up to report // should generate an attribute report. @@ -171,7 +171,7 @@ void emberAfPluginReportingInitCallback(void) scheduleTick(); } -void emberAfPluginReportingTickEventHandler(void) +extern "C" void emberAfPluginReportingTickEventHandler(void) { EmberApsFrame * apsFrame = NULL; EmberAfStatus status; diff --git a/src/app/util/types_stub.h b/src/app/util/types_stub.h index 98916787499666..b216daca94efb6 100644 --- a/src/app/util/types_stub.h +++ b/src/app/util/types_stub.h @@ -1963,10 +1963,6 @@ typedef struct #define emberAfPluginColorControlServerComputePwmFromHsvCallback(endpoint) (void) 0 #define emberAfPluginColorControlServerComputePwmFromTempCallback(endpoint) (void) 0 -#ifdef __cplusplus -} // extern "C" -#endif // __cplusplus - /** * @brief Macro that copies the token value from non-volatile storage into a RAM * location. This macro can only be used with tokens that are defined using @@ -2002,4 +1998,8 @@ typedef struct uint32_t halCommonGetInt32uMillisecondTick(void); +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + #endif // TYPES_STUB_H