-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates userinput backend to run commands on matter thread
- Loading branch information
1 parent
fb41aa2
commit 104841d
Showing
26 changed files
with
760 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#pragma once | ||
|
||
#include <new> | ||
|
||
{%- for cluster in clusters %} | ||
{%- if cluster | dynamicCluster(idl) %} | ||
#include "bridge/{{cluster.name}}.h" | ||
{%- endif %} | ||
{%- endfor %} | ||
|
||
namespace clusters { | ||
|
||
struct ClusterInfo | ||
{ | ||
chip::ClusterId id; | ||
const char *name; | ||
uint16_t size; | ||
CommonCluster* (*ctor)(void*); | ||
} static const kKnownClusters[] = { | ||
{% for cluster in clusters %} | ||
{%- if cluster | dynamicCluster(idl) %} | ||
{ | ||
{{cluster.code}}, | ||
"{{cluster.name}}", | ||
sizeof({{cluster.name}}Cluster), | ||
[](void *mem) -> CommonCluster* { | ||
return new(mem) {{cluster.name}}Cluster(); | ||
}, | ||
}, | ||
{%- endif %} | ||
{%- endfor %} | ||
}; | ||
|
||
inline void BridgeRegisterAllAttributeOverrides() | ||
{ | ||
{% for cluster in clusters %} | ||
{%- if cluster | dynamicCluster(idl) %} | ||
static {{cluster.name}}Access {{cluster.name}}; | ||
registerAttributeAccessOverride(&{{cluster.name}}); | ||
{%- endif %} | ||
{%- endfor %} | ||
} | ||
|
||
struct AttrInfo | ||
{ | ||
chip::ClusterId cluster; | ||
chip::AttributeId attr; | ||
const char *name; | ||
} static const kKnownAttributes[] = { | ||
{% for cluster in clusters %} | ||
{%- if cluster | dynamicCluster(idl) %} | ||
|
||
{%- for attr in cluster.attributes %} | ||
{ {{cluster.code}}, {{attr.definition.code}}, "{{attr.definition.name | capitalcase}}" }, | ||
{%- endfor %} | ||
|
||
{%- endif %} | ||
{%- endfor %} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.