diff --git a/examples/lighting-app/lighting-common/gen/callback-stub.c b/examples/lighting-app/lighting-common/gen/callback-stub.c index 2566ed862cec1c..37bb1d673f615a 100644 --- a/examples/lighting-app/lighting-common/gen/callback-stub.c +++ b/examples/lighting-app/lighting-common/gen/callback-stub.c @@ -43,6 +43,16 @@ //#include "hal/hal.h" //#include EMBER_AF_API_NETWORK_STEERING +/** @brief On/off Cluster Server Post Init + * + * Following resolution of the On/Off state at startup for this endpoint, + * perform any additional initialization needed; e.g., synchronize hardware + * state. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint) {} + /** @brief Add To Current App Tasks * * This function is only useful to sleepy end devices. This function will note @@ -2478,8 +2488,6 @@ void halSleepCallback(bool enter, SleepModes sleepMode) {} // These functions / constants are added to avoid ld failure when building with GN // They should be removed if we have zcl updates and nolonger need this or causing other errors -void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint) {} - bool emberAfIsCurrentSecurityProfileSmartEnergy(void) { return false; diff --git a/examples/lighting-app/lighting-common/gen/endpoint_config.h b/examples/lighting-app/lighting-common/gen/endpoint_config.h index 70c37bde9d2ec9..b84160d8b003dc 100644 --- a/examples/lighting-app/lighting-common/gen/endpoint_config.h +++ b/examples/lighting-app/lighting-common/gen/endpoint_config.h @@ -50,13 +50,16 @@ } // Cluster function static arrays -#define GENERATED_FUNCTION_ARRAYS +#define GENERATED_FUNCTION_ARRAYS \ + const EmberAfGenericClusterFunction emberAfFuncArrayOnOffClusterServer[] = { ( \ + EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback }; // Clusters definitions #define GENERATED_CLUSTERS \ { \ { \ - 0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, 3, (CLUSTER_MASK_SERVER), NULL, \ + 0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, \ + 3, (CLUSTER_MASK_SERVER | CLUSTER_MASK_INIT_FUNCTION), emberAfFuncArrayOnOffClusterServer, \ }, \ } diff --git a/examples/lighting-app/lighting-common/gen/gen_config.h b/examples/lighting-app/lighting-common/gen/gen_config.h index b1b1add4cd37b2..f7efba427e27c3 100644 --- a/examples/lighting-app/lighting-common/gen/gen_config.h +++ b/examples/lighting-app/lighting-common/gen/gen_config.h @@ -89,6 +89,7 @@ #define EMBER_CALLBACK_ON_OFF_CLUSTER_OFF #define EMBER_CALLBACK_ON_OFF_CLUSTER_ON #define EMBER_CALLBACK_ON_OFF_CLUSTER_TOGGLE +#define EMBER_CALLBACK_ON_OFF_CLUSTER_ON_OFF_CLUSTER_SERVER_INIT #define EMBER_CALLBACK_ENERGY_SCAN_RESULT #define EMBER_CALLBACK_SCAN_COMPLETE #define EMBER_CALLBACK_NETWORK_FOUND diff --git a/examples/lock-app/lock-common/gen/callback-stub.c b/examples/lock-app/lock-common/gen/callback-stub.c index 13fce467cd48a7..bd2109eef231b8 100644 --- a/examples/lock-app/lock-common/gen/callback-stub.c +++ b/examples/lock-app/lock-common/gen/callback-stub.c @@ -40,9 +40,20 @@ // of the callbacks have not been provided. #include "af.h" #include + //#include "hal/hal.h" //#include EMBER_AF_API_NETWORK_STEERING +/** @brief On/off Cluster Server Post Init + * + * Following resolution of the On/Off state at startup for this endpoint, + * perform any additional initialization needed; e.g., synchronize hardware + * state. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint) {} + /** @brief Add To Current App Tasks * * This function is only useful to sleepy end devices. This function will note diff --git a/examples/lock-app/lock-common/gen/endpoint_config.h b/examples/lock-app/lock-common/gen/endpoint_config.h index 70c37bde9d2ec9..b84160d8b003dc 100644 --- a/examples/lock-app/lock-common/gen/endpoint_config.h +++ b/examples/lock-app/lock-common/gen/endpoint_config.h @@ -50,13 +50,16 @@ } // Cluster function static arrays -#define GENERATED_FUNCTION_ARRAYS +#define GENERATED_FUNCTION_ARRAYS \ + const EmberAfGenericClusterFunction emberAfFuncArrayOnOffClusterServer[] = { ( \ + EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback }; // Clusters definitions #define GENERATED_CLUSTERS \ { \ { \ - 0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, 3, (CLUSTER_MASK_SERVER), NULL, \ + 0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, \ + 3, (CLUSTER_MASK_SERVER | CLUSTER_MASK_INIT_FUNCTION), emberAfFuncArrayOnOffClusterServer, \ }, \ } diff --git a/examples/lock-app/lock-common/gen/gen_config.h b/examples/lock-app/lock-common/gen/gen_config.h index b1b1add4cd37b2..f7efba427e27c3 100644 --- a/examples/lock-app/lock-common/gen/gen_config.h +++ b/examples/lock-app/lock-common/gen/gen_config.h @@ -89,6 +89,7 @@ #define EMBER_CALLBACK_ON_OFF_CLUSTER_OFF #define EMBER_CALLBACK_ON_OFF_CLUSTER_ON #define EMBER_CALLBACK_ON_OFF_CLUSTER_TOGGLE +#define EMBER_CALLBACK_ON_OFF_CLUSTER_ON_OFF_CLUSTER_SERVER_INIT #define EMBER_CALLBACK_ENERGY_SCAN_RESULT #define EMBER_CALLBACK_SCAN_COMPLETE #define EMBER_CALLBACK_NETWORK_FOUND