From d06daa25d9aa31599ce0210f0cdf58a5d1aed12b Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 3 Nov 2020 21:48:07 +0100 Subject: [PATCH] Move PWM color control callbacks from type stubs to the esp32 demo app (#3571) --- .../server/esp32/main/gen/callback-stub.c | 27 +++++++++++++++++++ .../server/esp32/main/gen/callback.h | 25 +++++++++++++++++ src/app/util/types_stub.h | 4 --- 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/examples/wifi-echo/server/esp32/main/gen/callback-stub.c b/examples/wifi-echo/server/esp32/main/gen/callback-stub.c index 8ab03ed3470cf9..87b5d7c0315b77 100644 --- a/examples/wifi-echo/server/esp32/main/gen/callback-stub.c +++ b/examples/wifi-echo/server/esp32/main/gen/callback-stub.c @@ -2367,3 +2367,30 @@ bool emberAfPluginIdentifyStopFeedbackCallback(uint8_t endpoint) emberAfPrintln(EMBER_AF_PRINT_IDENTIFY_CLUSTER, "Stop identify callback on endpoint %d", endpoint); return false; } + +/** @brief Compute Pwm from HSV + * + * This function is called from the color server when it is time for the PWMs to + * be driven with a new value from the HSV values. + * + * @param endpoint The identifying endpoint Ver.: always + */ +void emberAfPluginColorControlServerComputePwmFromHsvCallback(uint8_t endpoint) {} + +/** @brief Compute Pwm from HSV + * + * This function is called from the color server when it is time for the PWMs to + * be driven with a new value from the color temperature. + * + * @param endpoint The identifying endpoint Ver.: always + */ +void emberAfPluginColorControlServerComputePwmFromTempCallback(uint8_t endpoint) {} + +/** @brief Compute Pwm from HSV + * + * This function is called from the color server when it is time for the PWMs to + * be driven with a new value from the color X and color Y values. + * + * @param endpoint The identifying endpoint Ver.: always + */ +void emberAfPluginColorControlServerComputePwmFromXyCallback(uint8_t endpoint) {} diff --git a/examples/wifi-echo/server/esp32/main/gen/callback.h b/examples/wifi-echo/server/esp32/main/gen/callback.h index 31525dc2a13810..aed4de67a17855 100644 --- a/examples/wifi-echo/server/esp32/main/gen/callback.h +++ b/examples/wifi-echo/server/esp32/main/gen/callback.h @@ -8616,6 +8616,31 @@ bool emberAfColorControlClusterStepSaturationCallback(uint8_t stepMode, uint8_t */ bool emberAfColorControlClusterStopMoveStepCallback(uint8_t optionsMask, uint8_t optionsOverride); +/** @brief Compute Pwm from HSV + * + * This function is called from the color server when it is time for the PWMs to + * be driven with a new value from the HSV values. + * + * @param endpoint The identifying endpoint Ver.: always + */ +void emberAfPluginColorControlServerComputePwmFromHsvCallback(uint8_t endpoint); +/** @brief Compute Pwm from HSV + * + * This function is called from the color server when it is time for the PWMs to + * be driven with a new value from the color X and color Y values. + * + * @param endpoint The identifying endpoint Ver.: always + */ +void emberAfPluginColorControlServerComputePwmFromXyCallback(uint8_t endpoint); +/** @brief Compute Pwm from HSV + * + * This function is called from the color server when it is time for the PWMs to + * be driven with a new value from the color temperature. + * + * @param endpoint The identifying endpoint Ver.: always + */ +void emberAfPluginColorControlServerComputePwmFromTempCallback(uint8_t endpoint); + /** @} END Color Control Cluster Callbacks */ /** @name Ballast Configuration Cluster Callbacks */ diff --git a/src/app/util/types_stub.h b/src/app/util/types_stub.h index 88a5e87de98330..18769cf8c96145 100644 --- a/src/app/util/types_stub.h +++ b/src/app/util/types_stub.h @@ -1956,10 +1956,6 @@ typedef struct #define MILLISECOND_TICKS_PER_SECOND 1000 #define MILLISECOND_TICKS_PER_DECISECOND (MILLISECOND_TICKS_PER_SECOND / 10) -#define emberAfPluginColorControlServerComputePwmFromXyCallback(endpoint) (void) 0 -#define emberAfPluginColorControlServerComputePwmFromHsvCallback(endpoint) (void) 0 -#define emberAfPluginColorControlServerComputePwmFromTempCallback(endpoint) (void) 0 - /** * @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