diff --git a/src/app/zap-templates/attribute-size.zapt b/src/app/zap-templates/attribute-size.zapt new file mode 100644 index 00000000000000..5002bb3983c1ae --- /dev/null +++ b/src/app/zap-templates/attribute-size.zapt @@ -0,0 +1,11 @@ +{{chip_header}} + +// Prevent multiple inclusion +#pragma once + +// ZCL attribute sizes +{{#zcl_atomics}} +{{#if size}} +{{ident}}ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPE, {{size}}, \ +{{/if}} +{{/zcl_atomics}} diff --git a/src/app/zap-templates/attribute-type.zapt b/src/app/zap-templates/attribute-type.zapt index d7319af9e1c99d..c41da3019762d8 100644 --- a/src/app/zap-templates/attribute-type.zapt +++ b/src/app/zap-templates/attribute-type.zapt @@ -9,12 +9,3 @@ enum { {{ident}}ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPE = {{asHex atomicId 2}}, // {{description}} {{/zcl_atomics}} }; - -// ZCL attribute sizes -#define ZAP_GENERATED_ATTRIBUTE_SIZES { \ -{{#zcl_atomics}} -{{#if size}} -{{ident}}ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPE, {{size}}, \ -{{/if}} -{{/zcl_atomics}} -} diff --git a/src/app/zap-templates/chip-templates.json b/src/app/zap-templates/chip-templates.json index 3d46473c12855b..d3d561ae3294c4 100644 --- a/src/app/zap-templates/chip-templates.json +++ b/src/app/zap-templates/chip-templates.json @@ -23,6 +23,11 @@ "name": "ZCL attribute-type header", "output": "attribute-type.h" }, + { + "path": "attribute-size.zapt", + "name": "ZCL attribute-size header", + "output": "attribute-size.h" + }, { "path": "call-command-handler-src.zapt", "name": "ZCL call-command-handler source",