Skip to content

Commit

Permalink
[config-data] Add a new DefineBitmaps category to config-data.yaml to…
Browse files Browse the repository at this point in the history
… filter which bitmaps are allowed to generates #define (project-chip#25150)
  • Loading branch information
vivien-apple authored and David Lechner committed Mar 22, 2023
1 parent e1480a9 commit 55ff558
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 524 deletions.
9 changes: 9 additions & 0 deletions src/app/common/templates/config-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ WeakEnums:
- StepMode
- TemperatureDisplayMode

DefineBitmaps:
# Allow-list of bitmaps that we generates as #define as well as enum classes.
# The goal is to drive this down to 0.
- BarrierControlCapabilities
- BarrierControlSafetyStatus
- ColorLoopUpdateFlags
- LevelControlFeature
- PowerSourceFeature

# We need a more configurable way of deciding which clusters have which init functions....
# See https://github.com/project-chip/connectedhomeip/issues/4369
ClustersWithInitFunctions:
Expand Down
6 changes: 2 additions & 4 deletions src/app/zap-templates/templates/app/enums.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// ZCL enums

{{#zcl_enums}}
{{#unless (isStrEqual label "Status")}}
{{#unless (isStrEqual label "ReportingDirection")}}
{{#if (isInConfigList label "WeakEnums")}}

// Enum for {{label}}
Expand All @@ -19,13 +17,13 @@ enum EmberAf{{asType label}} : {{asUnderlyingZclType name}} {
{{/zcl_enum_items}}
};
{{/if}}
{{/unless}}
{{/unless}}
{{/zcl_enums}}

{{#zcl_bitmaps}}
{{#if (isInConfigList label "DefineBitmaps")}}
{{#zcl_bitmap_items}}
#define EMBER_AF_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} ({{mask}})
#define EMBER_AF_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}}_OFFSET ({{asOffset mask}})
{{/zcl_bitmap_items}}
{{/if}}
{{/zcl_bitmaps}}
Loading

0 comments on commit 55ff558

Please sign in to comment.