From aaa73f7d3ad7f6451e626224ee83c7be6fcf7329 Mon Sep 17 00:00:00 2001 From: xshuqun Date: Fri, 24 Nov 2023 09:12:17 +0800 Subject: [PATCH] [portinglayer] Matter Fan Example * Add Matter Fan Example into porting layer --- .../application/matter/example/fan/Makefile | 63 + .../application/matter/example/fan/README.md | 55 + .../matter/example/fan/example_matter_fan.cpp | 51 + .../matter/example/fan/example_matter_fan.h | 6 + .../matter/example/fan/fan-app.zap | 3713 +++++++++++++++++ .../matter/example/fan/lib_chip_fan_core.mk | 270 ++ .../matter/example/fan/lib_chip_fan_main.mk | 376 ++ .../matter/example/fan/matter_drivers.cpp | 121 + .../matter/example/fan/matter_drivers.h | 15 + component/common/example/example_entry.c | 5 + .../inc/platform_opts.h | 19 +- 11 files changed, 4685 insertions(+), 9 deletions(-) create mode 100644 component/common/application/matter/example/fan/Makefile create mode 100644 component/common/application/matter/example/fan/README.md create mode 100644 component/common/application/matter/example/fan/example_matter_fan.cpp create mode 100644 component/common/application/matter/example/fan/example_matter_fan.h create mode 100644 component/common/application/matter/example/fan/fan-app.zap create mode 100644 component/common/application/matter/example/fan/lib_chip_fan_core.mk create mode 100644 component/common/application/matter/example/fan/lib_chip_fan_main.mk create mode 100644 component/common/application/matter/example/fan/matter_drivers.cpp create mode 100644 component/common/application/matter/example/fan/matter_drivers.h diff --git a/component/common/application/matter/example/fan/Makefile b/component/common/application/matter/example/fan/Makefile new file mode 100644 index 00000000..b38da1cd --- /dev/null +++ b/component/common/application/matter/example/fan/Makefile @@ -0,0 +1,63 @@ +BASEDIR := $(shell pwd) +SDKROOTDIR := $(BASEDIR)/../../../../../.. +AMEBAZ2_TOOLDIR = $(SDKROOTDIR)/component/soc/realtek/8710c/misc/iar_utility +CHIPDIR = $(SDKROOTDIR)/third_party/connectedhomeip +BUILDDIR = $(BASEDIR)/build +OUTPUT_DIR = $(BUILDDIR)/chip +MATTER_TOOLDIR = $(SDKROOTDIR)/tools/matter + +FAN_FILE = $(OUTPUT_DIR)/codegen/cluster-file.txt +FAN_ZAP = $(BASEDIR)/fan-app.zap + +OS := $(shell uname) +LBITS := $(shell getconf LONG_BIT) + +.PHONY: toolchain +toolchain: + @echo Toolchain unzipping... +ifeq ($(findstring CYGWIN, $(OS)), CYGWIN) +ifneq ("$(LBITS)", "32") + @echo ONLY 32-BIT CYGWIN IS SUPPORTED! + @exit -1 +endif + if [ ! -f $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-6.4.1-cygwin-newlib-build-2778-i686.tar.bz2 ] ; then cat $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-6.4.1-cygwin-newlib-build-2778-i686.tar.bz2* > $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-6.4.1-cygwin-newlib-build-2778-i686.tar.bz2; fi;\ + if [ ! -d $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk ] ; then mkdir $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk; fi;\ + if [ ! -d $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk/cygwin ] ; then tar -jxf $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-6.4.1-cygwin-newlib-build-2778-i686.tar.bz2 -C $(SDKROOTDIR)/tools/arm-none-eabi-gcc/ ; mv $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-6.4.1/cygwin $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk/cygwin ;fi +endif + +ifeq ($(findstring MINGW32, $(OS)), MINGW32) + if [ ! -f /bin/unzip.exe ] ; then mingw-get.exe install msys-unzip; fi;\ + if [ ! -d $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk ] ; then mkdir $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk; fi;\ + if [ ! -d $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk/mingw32 ] ; then unzip -q -u $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk64-6.4.1-mingw32-newlib-build-3026.zip ; mv asdk-6.4.1/mingw32 $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk/mingw32 ; rm -rf asdk-6.4.1 ;fi +endif + +ifeq ($(findstring Linux, $(OS)), Linux) +ifneq ("$(LBITS)", "64") + @echo ONLY 64-BIT LINUX IS SUPPORTED! + @exit -1 +endif + if [ ! -f $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 ] ; then cat $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2* > $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2; fi;\ + if [ ! -d $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk ] ; then mkdir $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk; fi;\ + if [ ! -d $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk/linux ] ; then tar -jxf $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 -C $(SDKROOTDIR)/tools/arm-none-eabi-gcc/ ; mv $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-10.3.0/linux $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk/linux ; rmdir $(SDKROOTDIR)/tools/arm-none-eabi-gcc/asdk-10.3.0; fi +endif + @echo Toolchain unzip done! + +$(FAN_FILE): $(FAN_ZAP) + @mkdir -p $(OUTPUT_DIR)/codegen/zap-generated + @python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl-server.json -z $(CHIPDIR)/src/app/zap-templates/zcl/zcl.json --output-dir $(OUTPUT_DIR)/codegen/zap-generated $^ + @python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json -z $(CHIPDIR)/src/app/zap-templates/zcl/zcl.json --output-dir $(OUTPUT_DIR)/codegen/zap-generated $^ + @python3 $(CHIPDIR)/scripts/codegen.py --generator cpp-app --output-dir $(OUTPUT_DIR)/codegen --expected-outputs $(MATTER_TOOLDIR)/codegen_helpers/expected.outputs $(BASEDIR)/fan-app.matter + @python3 $(CHIPDIR)/src/app/zap_cluster_list.py --zap_file $^ > $@ + @python3 $(MATTER_TOOLDIR)/codegen_helpers/parse_clusters.py --cluster_file $@ --chip_path $(CHIPDIR) + +.PHONY: fan +fan: toolchain $(FAN_FILE) + $(MAKE) -f lib_chip_fan_core.mk all + $(MAKE) -f lib_chip_fan_main.mk all + +.PHONY: clean +clean: + @$(MAKE) -f lib_chip_fan_main.mk clean + @$(MAKE) -f lib_chip_fan_core.mk clean + rm -rf $(BUILDDIR) + rm -rf $(BASEDIR)/fan-app.matter diff --git a/component/common/application/matter/example/fan/README.md b/component/common/application/matter/example/fan/README.md new file mode 100644 index 00000000..ff001979 --- /dev/null +++ b/component/common/application/matter/example/fan/README.md @@ -0,0 +1,55 @@ +# FAN Example +This example is an implementation of the *FAN* device type. You will need a PWM fan. + +| Peripheral | Pin | +| ----------- | ----------- | +| Fan | PA_23 | + +## ZAP +Since there is no example ZAP file for the fan device type, we will use `fan-app.zap`. + +## How it works +The fan can be controlled in two ways, by the Matter controller, or by external means. In this example, we only demonstrate control via Matter controller. If you wish to add more methods to control (eg. a push button), you will need to implement the `downlink` task and handler. See `lighting-app` for button example. +Thus, we only use 1 Uplink queue to for the fan to be controlled by the Matter controller. + +### Peripheral Initialization +The initializations of the fan are handled in `matter_drivers.cpp`. + +### Fan Attribute Change +Whenever the Matter controller changes the Fanmode/Fanspeed attribute of the fan, 2 types of callbacks will be invoked: + 1. MatterPreAttributeChangeCallback - Change the Fanmode/Fanspeed before updating the Fanmode/Fanspeed attribute (TBD) + 2. MatterPostAttributeChangeCallback - Change the Fanmode/Fanspeed after updating the Fanmode/Fanspeed attribute + +These callbacks are defined in `core/matter_interaction.cpp`. +These callbacks will post an event to the uplink queue, which will be handled by `matter_driver_uplink_update_handler` in `matter_drivers.cpp`. +The driver codes will be called to carry out your actions depending on the Cluster and Attribute ID received. +You may add clusters and attributes handling in `matter_driver_uplink_update_handler` if they are not present. + +## How to build + +### Configurations +Enable `CONFIG_EXAMPLE_MATTER` and `CONFIG_EXAMPLE_MATTER_FAN` in `platform_opts.h`. +Ensure that `CONFIG_EXAMPLE_MATTER_CHIPTEST` is disabled. + +### Setup the Build Environment + + cd connectedhomeip + source scripts/activate.sh + +### Build Matter Libraries + + cd ambz2_matter/component/common/application/matter/example/fan + make fan + +### Build the Final Firmware + + cd ambz2_matter/project/realtek_amebaz2_v0_example/GCC-RELEASE/ + make is_matter + +### Flash the Image +Refer to this [guide](https://github.com/ambiot/ambz2_matter/blob/main/tools/AmebaZ2/Image_Tool_Linux/README.md) to flash the image with the Linux Image Tool + +### Clean Matter Libraries + + cd ambz2_matter/component/common/application/matter/example/fan + make clean diff --git a/component/common/application/matter/example/fan/example_matter_fan.cpp b/component/common/application/matter/example/fan/example_matter_fan.cpp new file mode 100644 index 00000000..e3305d7c --- /dev/null +++ b/component/common/application/matter/example/fan/example_matter_fan.cpp @@ -0,0 +1,51 @@ +#include "FreeRTOS.h" +#include "task.h" +#include "platform/platform_stdlib.h" +#include "basic_types.h" +#include "platform_opts.h" +#include "section_config.h" +#include "wifi_constants.h" +#include "wifi/wifi_conf.h" +#include "chip_porting.h" +#include "matter_core.h" +#include "matter_drivers.h" +#include "matter_interaction.h" + +#if defined(CONFIG_EXAMPLE_MATTER_FAN) && CONFIG_EXAMPLE_MATTER_FAN +static void example_matter_fan_task(void *pvParameters) +{ + while(!(wifi_is_up(RTW_STA_INTERFACE) || wifi_is_up(RTW_AP_INTERFACE))) { + vTaskDelay(500); + } + + ChipLogProgress(DeviceLayer, "Fan Example!\n"); + + CHIP_ERROR err = CHIP_NO_ERROR; + + initPref(); // init NVS + // + err = matter_core_start(); + if (err != CHIP_NO_ERROR) + ChipLogProgress(DeviceLayer, "matter_core_start failed!\n"); + + err = matter_driver_fan_init(); + if (err != CHIP_NO_ERROR) + ChipLogProgress(DeviceLayer, "matter_driver_fan_init failed!\n"); + + err = matter_driver_fan_set_startup_value(); + if (err != CHIP_NO_ERROR) + ChipLogProgress(DeviceLayer, "matter_driver_fan_set_startup_value failed!\n"); + + err = matter_interaction_start_uplink(); + if (err != CHIP_NO_ERROR) + ChipLogProgress(DeviceLayer, "matter_interaction_start_uplink failed!\n"); + + vTaskDelete(NULL); +} + +extern "C" void example_matter_fan(void) +{ + if(xTaskCreate(example_matter_fan_task, ((const char*)"example_matter_fan_task"), 2048, NULL, tskIDLE_PRIORITY + 1, NULL) != pdPASS) + ChipLogProgress(DeviceLayer, "\n\r%s xTaskCreate(example_matter_fan) failed", __FUNCTION__); +} +#endif /* CONFIG_EXAMPLE_MATTER_FAN */ diff --git a/component/common/application/matter/example/fan/example_matter_fan.h b/component/common/application/matter/example/fan/example_matter_fan.h new file mode 100644 index 00000000..3249cefd --- /dev/null +++ b/component/common/application/matter/example/fan/example_matter_fan.h @@ -0,0 +1,6 @@ +#ifndef EXAMPLE_MATTER_FAN_H +#define EXAMPLE_MATTER_FAN_H + +void example_matter_fan_task(void); + +#endif /* EXAMPLE_MATTER_FAN_H */ diff --git a/component/common/application/matter/example/fan/fan-app.zap b/component/common/application/matter/example/fan/fan-app.zap new file mode 100644 index 00000000..0b84cac9 --- /dev/null +++ b/component/common/application/matter/example/fan/fan-app.zap @@ -0,0 +1,3713 @@ +{ + "fileFormat": 2, + "featureLevel": 99, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../../../third_party/connectedhomeip/src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../../third_party/connectedhomeip/src/app/zap-templates/zcl/zcl-with-test-extensions.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data with some extensions" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "SoftwareFault", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + }, + "deviceTypes": [ + { + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 43 + ], + "deviceTypeName": "MA-fan", + "deviceTypeCode": 43, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "attributes": [ + { + "name": "FanMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "FanModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FanModeSequence", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "FanModeSequenceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentSetting", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentCurrent", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedMax", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/component/common/application/matter/example/fan/lib_chip_fan_core.mk b/component/common/application/matter/example/fan/lib_chip_fan_core.mk new file mode 100644 index 00000000..561e0212 --- /dev/null +++ b/component/common/application/matter/example/fan/lib_chip_fan_core.mk @@ -0,0 +1,270 @@ +SHELL = /bin/bash + +# Initialize tool chain +# ------------------------------------------------------------------- +BASEDIR := $(shell pwd) +SDKROOTDIR := $(BASEDIR)/../../../../../.. +AMEBAZ2_TOOLDIR = $(SDKROOTDIR)/component/soc/realtek/8710c/misc/iar_utility +CHIPDIR = $(SDKROOTDIR)/third_party/connectedhomeip +OUTPUT_DIR = $(BASEDIR)/build/chip +MATTER_TOOLDIR = $(SDKROOTDIR)/tools/matter + +OS := $(shell uname) + +CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi- + +# Compilation tools +AR = $(CROSS_COMPILE)ar +CC = $(CROSS_COMPILE)gcc +AS = $(CROSS_COMPILE)as +NM = $(CROSS_COMPILE)nm +LD = $(CROSS_COMPILE)gcc +GDB = $(CROSS_COMPILE)gdb +OBJCOPY = $(CROSS_COMPILE)objcopy +OBJDUMP = $(CROSS_COMPILE)objdump + +OS := $(shell uname) + +# Initialize target name and target object files +# ------------------------------------------------------------------- + +OBJ_DIR=$(TARGET)/Debug/obj +BIN_DIR=$(TARGET)/Debug/bin +INFO_DIR=$(TARGET)/Debug/info + +# Include folder list +# ------------------------------------------------------------------- + +INCLUDES = +INCLUDES += -I$(SDKROOTDIR)/project/realtek_amebaz2_v0_example/inc + +INCLUDES += -I$(SDKROOTDIR)/component/common/api +INCLUDES += -I$(SDKROOTDIR)/component/common/api/at_cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/api/platform +INCLUDES += -I$(SDKROOTDIR)/component/common/api/wifi +INCLUDES += -I$(SDKROOTDIR)/component/common/api/wifi/rtw_wpa_supplicant/src +INCLUDES += -I$(SDKROOTDIR)/component/common/api/wifi/rtw_wpa_supplicant/src/crypto +INCLUDES += -I$(SDKROOTDIR)/component/common/api/network/include +INCLUDES += -I$(SDKROOTDIR)/component/common/application +INCLUDES += -I$(SDKROOTDIR)/component/common/application/mqtt/MQTTClient +INCLUDES += -I$(SDKROOTDIR)/component/common/example +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/dct +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/fatfs +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/fatfs/r0.10c/include +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/ftl +INCLUDES += -I$(SDKROOTDIR)/component/common/utilities +INCLUDES += -I$(SDKROOTDIR)/component/common/mbed/hal +INCLUDES += -I$(SDKROOTDIR)/component/common/mbed/hal_ext +INCLUDES += -I$(SDKROOTDIR)/component/common/mbed/targets/hal/rtl8710c +INCLUDES += -I$(SDKROOTDIR)/component/common/network +INCLUDES += -I$(SDKROOTDIR)/component/common/network/coap/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/libcoap/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/http2/nghttp2-1.31.0/includes +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/src/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/src/include/lwip +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/port/realtek +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/port/realtek/freertos +INCLUDES += -I$(SDKROOTDIR)/component/common/network/ssl/mbedtls-matter/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/ssl/mbedtls-matter/include/mbedtls +#INCLUDES += -I$(SDKROOTDIR)/component/common/network/ssl/ssl_ram_map/rom +INCLUDES += -I$(SDKROOTDIR)/component/common/drivers/wlan/realtek/include +INCLUDES += -I$(SDKROOTDIR)/component/common/drivers/wlan/realtek/src/osdep +INCLUDES += -I$(SDKROOTDIR)/component/common/drivers/wlan/realtek/src/core/option +INCLUDES += -I$(SDKROOTDIR)/component/common/test +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/app +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/gap +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/profile/client +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/profile/server +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/os +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/platform +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/stack +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/lib +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/data_uart +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/hci +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/os +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/vendor_cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/ble_central +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/ble_peripheral +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/ble_scatternet +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_fuzz_test +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_ota_central_client +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_datatrans +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/common +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/gap +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/inc/amebaz2 +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/model +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/model/realtek +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/platform +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/utility +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/provisioner +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/device +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api/common +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api/provisioner +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api/device +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_provisioner_rtk_demo +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_provisioner_rtk_demo/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_device_rtk_demo +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_multiple_profile/device_multiple_profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_multiple_profile/provisioner_multiple_profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_multiple_profile/bt_mesh_device_matter +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_test +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/src/mcu/module/data_uart_cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/src/app/hrp/gap +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/common/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_airsync_config +INCLUDES += -I$(SDKROOTDIR)/component/common/media/rtp_codec +INCLUDES += -I$(SDKROOTDIR)/component/common/media/mmfv2 +INCLUDES += -I$(SDKROOTDIR)/component/common/application/airsync/1.0.4 + +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/cmsis/rtl8710c/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/cmsis/rtl8710c/lib/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/fwlib/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/fwlib/lib/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/cmsis/cmsis-core/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/app/rtl_printf/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/app/shell +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/app/stdio_port +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/utilities/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/mbed-drivers/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/platform +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/driver +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/os + +INCLUDES += -I$(SDKROOTDIR)/component/os/freertos +INCLUDES += -I$(SDKROOTDIR)/component/os/freertos/freertos_v10.0.1/Source/include +INCLUDES += -I$(SDKROOTDIR)/component/os/freertos/freertos_v10.0.1/Source/portable/GCC/ARM_RTL8710C +INCLUDES += -I$(SDKROOTDIR)/component/os/os_dep/include + +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/bluetooth +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/bluetooth/bt_matter_adapter +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/mbedtls +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/port + +# CHIP Include folder list +# ------------------------------------------------------------------- +INCLUDES += -I$(CHIPDIR)/config/ameba +INCLUDES += -I$(CHIPDIR)/src/include/platform/Ameba +INCLUDES += -I$(CHIPDIR)/src/include +INCLUDES += -I$(CHIPDIR)/src/lib +INCLUDES += -I$(CHIPDIR)/src +INCLUDES += -I$(CHIPDIR)/src/system +INCLUDES += -I$(CHIPDIR)/src/app +INCLUDES += -I$(CHIPDIR)/third_party/nlassert/repo/include +INCLUDES += -I$(CHIPDIR)/third_party/nlio/repo/include +INCLUDES += -I$(CHIPDIR)/third_party/nlunit-test/repo/src + +# Compile options +# ------------------------------------------------------------------- + +CFLAGS = +CFLAGS += -march=armv8-m.main+dsp -mthumb -mcmse -mfloat-abi=soft -D__thumb2__ -g -gdwarf-3 -Os +CFLAGS += -D__ARM_ARCH_8M_MAIN__=1 -gdwarf-3 -fstack-usage -fdata-sections -ffunction-sections +CFLAGS += -fdiagnostics-color=always -Wall -Wpointer-arith -Wno-write-strings +CFLAGS += -Wno-maybe-uninitialized -c -MMD +CFLAGS += -DCONFIG_PLATFORM_8710C -DCONFIG_BUILD_RAM=1 +CFLAGS += -DV8M_STKOVF +#for time64 +ifdef SYSTEM_TIME64_MAKE_OPTION +CFLAGS += -DCONFIG_SYSTEM_TIME64=1 +CFLAGS += -include time64.h +else +CFLAGS += -DCONFIG_SYSTEM_TIME64=0 +endif + +# for matter blemgr adapter +#CFLAGS += -DCONFIG_MATTER_BLEMGR_ADAPTER=1 + +# CHIP options +# ------------------------------------------------------------------- +CFLAGS += -DCHIP_PROJECT=1 +CFLAGS += -DCONFIG_ENABLE_AMEBA_FACTORY_DATA=0 +CFLAGS += -DCHIP_DEVICE_LAYER_TARGET=Ameba +CFLAGS += -DMBEDTLS_CONFIG_FILE=\"mbedtls_config.h\" + +CFLAGS += -DLWIP_IPV6_ND=1 +CFLAGS += -DLWIP_IPV6_SCOPES=0 +CFLAGS += -DLWIP_PBUF_FROM_CUSTOM_POOLS=0 +CFLAGS += -DLWIP_IPV6_ROUTE_TABLE_SUPPORT=1 + +CFLAGS += -DCHIP_DEVICE_LAYER_NONE=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS=0 + +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_LWIP=1 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_SOCKETS=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=0 + +CXXFLAGS += -DFD_SETSIZE=10 + +CXXFLAGS += -Wno-sign-compare +CXXFLAGS += -Wno-unused-function +CXXFLAGS += -Wno-unused-but-set-variable +CXXFLAGS += -Wno-unused-label +CXXFLAGS += -Wno-unused-variable +CXXFLAGS += -Wno-deprecated-declarations +CXXFLAGS += -Wno-unused-parameter +CXXFLAGS += -Wno-format +CXXFLAGS += -Wno-format-nonliteral +CXXFLAGS += -Wno-format-security + +CXXFLAGS += -std=gnu++17 +CXXFLAGS += -fno-rtti + +CHIP_CFLAGS = $(CFLAGS) +CHIP_CFLAGS += $(INCLUDES) + +CHIP_CXXFLAGS += $(CFLAGS) +CHIP_CXXFLAGS += $(CXXFLAGS) +CHIP_CXXFLAGS += $(INCLUDES) + +#*****************************************************************************# +# RULES TO GENERATE TARGETS # +#*****************************************************************************# + +# Define the Rules to build the core targets +all: GENERATE_NINJA + +GENERATE_NINJA: + echo "INSTALL CHIP..." && \ + echo $(BASEDIR) && \ + mkdir -p $(OUTPUT_DIR) && \ + echo > $(OUTPUT_DIR)/args.gn && \ + echo "import(\"//args.gni\")" >> $(OUTPUT_DIR)/args.gn && \ + echo target_cflags_c = [$(foreach word,$(CHIP_CFLAGS),\"$(word)\",)] | sed -e 's/=\"/=\\"/g;s/\"\"/\\"\"/g;' >> $(OUTPUT_DIR)/args.gn && \ + echo target_cflags_cc = [$(foreach word,$(CHIP_CXXFLAGS),\"$(word)\",)] | sed -e 's/=\"/=\\"/g;s/\"\"/\\"\"/g;' >> $(OUTPUT_DIR)/args.gn && \ + echo ameba_ar = \"arm-none-eabi-ar\" >> $(OUTPUT_DIR)/args.gn && \ + echo ameba_cc = \"arm-none-eabi-gcc\" >> $(OUTPUT_DIR)/args.gn && \ + echo ameba_cxx = \"arm-none-eabi-c++\" >> $(OUTPUT_DIR)/args.gn && \ + echo ameba_cpu = \"ameba\" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_enable_ota_requestor = "true" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_inet_config_enable_ipv4 = "false" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_support_enable_storage_api_audit = "false" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_use_transitional_commissionable_data_provider = "false" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_logging = "true" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_error_logging = "true" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_progress_logging = "true" >> $(OUTPUT_DIR)/args.gn && \ + echo chip_detail_logging = "false" >> $(OUTPUT_DIR)/args.gn && \ + sed -i 's/chip_build_tests\ =\ true/chip_build_tests\ =\ false/g' $(CHIPDIR)/config/ameba/args.gni && \ + mkdir -p $(CHIPDIR)/config/ameba/components/chip && \ + cd $(CHIPDIR)/config/ameba/components/chip && gn gen --check --fail-on-unused-args $(BASEDIR)/build/chip && \ + cd $(CHIPDIR)/config/ameba/components/chip ; ninja -C $(BASEDIR)/build/chip :ameba && \ + cp -f $(OUTPUT_DIR)/lib/* $(SDKROOTDIR)/component/soc/realtek/8710c/misc/bsp/lib/common/GCC + +#*****************************************************************************# +# CLEAN GENERATED FILES # +#*****************************************************************************# +.PHONY: clean +clean: + echo "RM $(OUTPUT_DIR)" + rm -rf $(OUTPUT_DIR) + diff --git a/component/common/application/matter/example/fan/lib_chip_fan_main.mk b/component/common/application/matter/example/fan/lib_chip_fan_main.mk new file mode 100644 index 00000000..147a0a93 --- /dev/null +++ b/component/common/application/matter/example/fan/lib_chip_fan_main.mk @@ -0,0 +1,376 @@ +SHELL = /bin/bash + +# Initialize tool chain +# ------------------------------------------------------------------- +BASEDIR := $(shell pwd) +SDKROOTDIR := $(BASEDIR)/../../../../../.. +AMEBAZ2_TOOLDIR = $(SDKROOTDIR)/component/soc/realtek/8710c/misc/iar_utility +CHIPDIR = $(SDKROOTDIR)/third_party/connectedhomeip +OUTPUT_DIR = $(BASEDIR)/build/chip +CODEGENDIR = $(OUTPUT_DIR)/codegen + +CHIP_ENABLE_OTA_REQUESTOR = $(shell grep 'chip_enable_ota_requestor' $(OUTPUT_DIR)/args.gn | cut -d' ' -f3) + +OS := $(shell uname) + +#CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi- +CROSS_COMPILE = arm-none-eabi- + +# Compilation tools +AR = $(CROSS_COMPILE)ar +CC = $(CROSS_COMPILE)gcc +AS = $(CROSS_COMPILE)as +NM = $(CROSS_COMPILE)nm +LD = $(CROSS_COMPILE)gcc +GDB = $(CROSS_COMPILE)gdb +OBJCOPY = $(CROSS_COMPILE)objcopy +OBJDUMP = $(CROSS_COMPILE)objdump + +OS := $(shell uname) + +# Initialize target name and target object files +# ------------------------------------------------------------------- + +all: lib_main + +TARGET=lib_main + +OBJ_DIR=$(TARGET)/Debug/obj +BIN_DIR=$(TARGET)/Debug/bin +INFO_DIR=$(TARGET)/Debug/info + +# Include folder list +# ------------------------------------------------------------------- + +INCLUDES = +INCLUDES += -I$(SDKROOTDIR)/project/realtek_amebaz2_v0_example/inc + +INCLUDES += -I$(SDKROOTDIR)/component/common/api +INCLUDES += -I$(SDKROOTDIR)/component/common/api/at_cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/api/platform +INCLUDES += -I$(SDKROOTDIR)/component/common/api/wifi +INCLUDES += -I$(SDKROOTDIR)/component/common/api/wifi/rtw_wpa_supplicant/src +INCLUDES += -I$(SDKROOTDIR)/component/common/api/wifi/rtw_wpa_supplicant/src/crypto +INCLUDES += -I$(SDKROOTDIR)/component/common/api/network/include +INCLUDES += -I$(SDKROOTDIR)/component/common/application +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter +INCLUDES += -I$(SDKROOTDIR)/component/common/application/mqtt/MQTTClient +INCLUDES += -I$(SDKROOTDIR)/component/common/example +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/dct +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/fatfs +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/fatfs/r0.10c/include +INCLUDES += -I$(SDKROOTDIR)/component/common/file_system/ftl +INCLUDES += -I$(SDKROOTDIR)/component/common/utilities +INCLUDES += -I$(SDKROOTDIR)/component/common/mbed/hal +INCLUDES += -I$(SDKROOTDIR)/component/common/mbed/hal_ext +INCLUDES += -I$(SDKROOTDIR)/component/common/mbed/targets/hal/rtl8710c +INCLUDES += -I$(SDKROOTDIR)/component/common/network +INCLUDES += -I$(SDKROOTDIR)/component/common/network/coap/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/libcoap/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/http2/nghttp2-1.31.0/includes +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/src/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/src/include/lwip +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/port/realtek +INCLUDES += -I$(SDKROOTDIR)/component/common/network/lwip/lwip_v2.1.2/port/realtek/freertos +INCLUDES += -I$(SDKROOTDIR)/component/common/network/ssl/mbedtls-matter/include +INCLUDES += -I$(SDKROOTDIR)/component/common/network/ssl/mbedtls-matter/include/mbedtls +#INCLUDES += -I$(SDKROOTDIR)/component/common/network/ssl/ssl_ram_map/rom +INCLUDES += -I$(SDKROOTDIR)/component/common/drivers/wlan/realtek/include +INCLUDES += -I$(SDKROOTDIR)/component/common/drivers/wlan/realtek/src/osdep +INCLUDES += -I$(SDKROOTDIR)/component/common/drivers/wlan/realtek/src/core/option +INCLUDES += -I$(SDKROOTDIR)/component/common/test +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/app +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/gap +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/profile/client +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/bluetooth/profile/server +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/os +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/platform +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/inc/stack +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/lib +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/data_uart +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/hci +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/os +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/amebaz2/src/vendor_cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/ble_central +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/ble_peripheral +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/ble_scatternet +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_fuzz_test +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_ota_central_client +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_datatrans +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/common +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/gap +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/inc/amebaz2 +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/model +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/model/realtek +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/platform +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/lib/utility +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/provisioner +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/device +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api/common +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api/provisioner +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api/device +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh/api +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_provisioner_rtk_demo +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_provisioner_rtk_demo/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_device_rtk_demo +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_multiple_profile/device_multiple_profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_multiple_profile/provisioner_multiple_profile +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_multiple_profile/bt_mesh_device_matter +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_mesh_test +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/src/mcu/module/data_uart_cmd +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/src/app/hrp/gap +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/board/common/inc +INCLUDES += -I$(SDKROOTDIR)/component/common/bluetooth/realtek/sdk/example/bt_airsync_config +INCLUDES += -I$(SDKROOTDIR)/component/common/media/rtp_codec +INCLUDES += -I$(SDKROOTDIR)/component/common/media/mmfv2 +INCLUDES += -I$(SDKROOTDIR)/component/common/application/airsync/1.0.4 + +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/cmsis/rtl8710c/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/cmsis/rtl8710c/lib/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/fwlib/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/fwlib/lib/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/cmsis/cmsis-core/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/app/rtl_printf/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/app/shell +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/app/stdio_port +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/utilities/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/mbed-drivers/include +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/platform +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/driver +INCLUDES += -I$(SDKROOTDIR)/component/soc/realtek/8710c/misc/os + +INCLUDES += -I$(SDKROOTDIR)/component/os/freertos +INCLUDES += -I$(SDKROOTDIR)/component/os/freertos/freertos_v10.0.1/Source/include +INCLUDES += -I$(SDKROOTDIR)/component/os/freertos/freertos_v10.0.1/Source/portable/GCC/ARM_RTL8710C +INCLUDES += -I$(SDKROOTDIR)/component/os/os_dep/include + +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/api +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/bluetooth +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/bluetooth/bt_matter_adapter +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/mbedtls +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/common/port +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/core +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/driver +INCLUDES += -I$(SDKROOTDIR)/component/common/application/matter/example/light + +# CHIP Include folder list +# ------------------------------------------------------------------- +INCLUDES += -I$(CHIPDIR)/zzz_generated/app-common +# INCLUDES += -I$(CHIPDIR)/zzz_generated/lighting-app +# INCLUDES += -I$(CHIPDIR)/zzz_generated/lighting-app/zap-generated +# INCLUDES += -I$(CHIPDIR)/examples/lighting-app/lighting-common +# INCLUDES += -I$(CHIPDIR)/examples/lighting-app/ameba/main/include +# INCLUDES += -I$(CHIPDIR)/examples/lighting-app/ameba/build/chip/gen/include +INCLUDES += -I$(OUTPUT_DIR)/gen/include +INCLUDES += -I$(CHIPDIR)/examples/platform/ameba +INCLUDES += -I$(CHIPDIR)/examples/providers +INCLUDES += -I$(CHIPDIR)/src/include +INCLUDES += -I$(CHIPDIR)/src/lib +INCLUDES += -I$(CHIPDIR)/src +INCLUDES += -I$(CHIPDIR)/third_party/nlassert/repo/include +INCLUDES += -I$(CHIPDIR)/src/app +INCLUDES += -I$(CHIPDIR)/src/app/util +INCLUDES += -I$(CHIPDIR)/src/app/server +INCLUDES += -I$(CHIPDIR)/src/app/clusters/bindings +INCLUDES += -I$(CHIPDIR)/third_party/nlio/repo/include +INCLUDES += -I$(CHIPDIR)/third_party/nlunit-test/repo/src +INCLUDES += -I$(CODEGENDIR) + +# Source file list +# ------------------------------------------------------------------- + +SRC_C = +SRC_C += $(CHIPDIR)/examples/platform/ameba/route_hook/ameba_route_hook.c +SRC_C += $(CHIPDIR)/examples/platform/ameba/route_hook/ameba_route_table.c + +SRC_CPP = + +SRC_CPP += $(CHIPDIR)/src/app/server/AclStorage.cpp +SRC_CPP += $(CHIPDIR)/src/app/server/DefaultAclStorage.cpp +SRC_CPP += $(CHIPDIR)/src/app/server/EchoHandler.cpp +SRC_CPP += $(CHIPDIR)/src/app/server/Dnssd.cpp +SRC_CPP += $(CHIPDIR)/src/app/server/OnboardingCodesUtil.cpp +SRC_CPP += $(CHIPDIR)/src/app/server/Server.cpp +SRC_CPP += $(CHIPDIR)/src/app/server/CommissioningWindowManager.cpp + +SRC_CPP += $(CHIPDIR)/src/app/icd/ICDManagementServer.cpp +SRC_CPP += $(CHIPDIR)/src/app/icd/ICDMonitoringTable.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/attribute-storage.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/attribute-table.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/binding-table.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/DataModelHandler.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/ember-compatibility-functions.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/generic-callback-stubs.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/message.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/util.cpp +SRC_CPP += $(CHIPDIR)/src/app/util/privilege-storage.cpp + +SRC_CPP += $(CHIPDIR)/src/app/reporting/Engine.cpp + +SRC_CPP += $(shell cat $(CODEGENDIR)/cluster-file.txt) + +SRC_CPP += $(CODEGENDIR)/app/callback-stub.cpp +SRC_CPP += $(CODEGENDIR)/zap-generated/IMClusterCommandHandler.cpp + +SRC_CPP += $(CHIPDIR)/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +SRC_CPP += $(CHIPDIR)/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp + +SRC_CPP += $(CHIPDIR)/examples/providers/DeviceInfoProviderImpl.cpp + +# Custom light-app src files with porting layer +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/api/matter_api.cpp +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/core/matter_core.cpp +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/core/matter_interaction.cpp +ifeq ($(CHIP_ENABLE_OTA_REQUESTOR), true) +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/core/matter_ota_initializer.cpp +endif +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/driver/fan_driver.cpp +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/example/fan/example_matter_fan.cpp +SRC_CPP += $(SDKROOTDIR)/component/common/application/matter/example/fan/matter_drivers.cpp + +#lib_version +VER_C += $(TARGET)_version.c + +# Generate obj list +# ------------------------------------------------------------------- + +SRC_O = $(patsubst %.c,%_$(TARGET).o,$(SRC_C)) +VER_O = $(patsubst %.c,%_$(TARGET).o,$(VER_C)) + +SRC_C_LIST = $(notdir $(SRC_C)) $(notdir $(DRAM_C)) +OBJ_LIST = $(addprefix $(OBJ_DIR)/,$(patsubst %.c,%_$(TARGET).o,$(SRC_C_LIST))) +DEPENDENCY_LIST = $(addprefix $(OBJ_DIR)/,$(patsubst %.c,%_$(TARGET).d,$(SRC_C_LIST))) + +SRC_OO += $(patsubst %.cpp,%_$(TARGET).oo,$(SRC_CPP)) +SRC_CPP_LIST = $(notdir $(SRC_CPP)) +OBJ_CPP_LIST = $(addprefix $(OBJ_DIR)/,$(patsubst %.cpp,%_$(TARGET).oo,$(SRC_CPP_LIST))) +DEPENDENCY_LIST += $(addprefix $(OBJ_DIR)/,$(patsubst %.cpp,%_$(TARGET).d,$(SRC_CPP_LIST))) + +# Compile options +# ------------------------------------------------------------------- + +CFLAGS = +CFLAGS += -march=armv8-m.main+dsp -mthumb -mcmse -mfloat-abi=soft -D__thumb2__ -g -gdwarf-3 -Os +CFLAGS += -D__ARM_ARCH_8M_MAIN__=1 -gdwarf-3 -fstack-usage -fdata-sections -ffunction-sections +CFLAGS += -fdiagnostics-color=always -Wall -Wpointer-arith -Wno-write-strings +CFLAGS += -Wno-maybe-uninitialized --save-temps -c -MMD +CFLAGS += -DCONFIG_PLATFORM_8710C -DCONFIG_BUILD_RAM=1 +CFLAGS += -DV8M_STKOVF + +# CHIP options +# ------------------------------------------------------------------- +CFLAGS += -DCHIP_PROJECT=1 +CFLAGS += -DCONFIG_ENABLE_OTA_REQUESTOR=1 +CFLAGS += -DCONFIG_ENABLE_AMEBA_FACTORY_DATA=0 +CFLAGS += -DCHIP_DEVICE_LAYER_TARGET=Ameba +CFLAGS += -DMBEDTLS_CONFIG_FILE=\"mbedtls_config.h\" +CFLAGS += -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\"lib/address_resolve/AddressResolve_DefaultImpl.h\" + +CFLAGS += -DLWIP_IPV6_ND=1 +CFLAGS += -DLWIP_IPV6_SCOPES=0 +CFLAGS += -DLWIP_PBUF_FROM_CUSTOM_POOLS=0 +CFLAGS += -DLWIP_IPV6_ROUTE_TABLE_SUPPORT=1 + +CFLAGS += -DCHIP_DEVICE_LAYER_NONE=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS=0 + +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_LWIP=1 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_SOCKETS=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=0 +CFLAGS += -DCHIP_SYSTEM_CONFIG_POSIX_LOCKING=0 +CFLAGS += -DINET_CONFIG_ENABLE_IPV4=0 + +CFLAGS += -DUSE_ZAP_CONFIG +CFLAGS += -DCHIP_HAVE_CONFIG_H + +CPPFLAGS := $(CFLAGS) + +CPPFLAGS += -DFD_SETSIZE=10 +CPPFLAGS += -Wno-sign-compare +CPPFLAGS += -Wno-unused-function +CPPFLAGS += -Wno-unused-but-set-variable +CPPFLAGS += -Wno-unused-variable +CPPFLAGS += -Wno-deprecated-declarations +CPPFLAGS += -Wno-unused-parameter +CPPFLAGS += -Wno-format + +CPPFLAGS += -std=gnu++17 +CPPFLAGS += -fno-rtti + +# Compile +# ------------------------------------------------------------------- + +.PHONY: lib_main +lib_main: prerequirement $(SRC_O) $(DRAM_O) $(SRC_OO) + $(AR) crv $(BIN_DIR)/$(TARGET).a $(OBJ_CPP_LIST) $(OBJ_LIST) $(VER_O) + cp $(BIN_DIR)/$(TARGET).a $(SDKROOTDIR)/component/soc/realtek/8710c/misc/bsp/lib/common/GCC/$(TARGET).a + +# Manipulate Image +# ------------------------------------------------------------------- + +.PHONY: manipulate_images +manipulate_images: + @echo =========================================================== + @echo Image manipulating + @echo =========================================================== + +# Generate build info +# ------------------------------------------------------------------- + +.PHONY: prerequirement +prerequirement: + @rm -f $(TARGET)_version*.o + @echo const char $(TARGET)_rev[] = \"$(TARGET)_ver_`git rev-parse HEAD`_`date +%Y/%m/%d-%T`\"\; > $(TARGET)_version.c + @$(CC) $(CFLAGS) $(INCLUDES) -c $(VER_C) -o $(VER_O) + @if [ ! -d $(ARM_GCC_TOOLCHAIN) ]; then \ + echo ===========================================================; \ + echo Toolchain not found, \"make toolchain\" first!; \ + echo ===========================================================; \ + exit -1; \ + fi + @echo =========================================================== + @echo Build $(TARGET) + @echo =========================================================== + mkdir -p $(OBJ_DIR) + mkdir -p $(BIN_DIR) + mkdir -p $(INFO_DIR) + +$(SRC_OO): %_$(TARGET).oo : %.cpp | prerequirement + $(CC) $(CPPFLAGS) $(INCLUDES) -c $< -o $@ + $(CC) $(CPPFLAGS) $(INCLUDES) -c $< -MM -MT $@ -MF $(OBJ_DIR)/$(notdir $(patsubst %.oo,%.d,$@)) + cp $@ $(OBJ_DIR)/$(notdir $@) + cp $*_$(TARGET).ii $(INFO_DIR) + cp $*_$(TARGET).s $(INFO_DIR) + chmod 777 $(OBJ_DIR)/$(notdir $@) + +$(SRC_O): %_$(TARGET).o : %.c | prerequirement + $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ + $(CC) $(CFLAGS) $(INCLUDES) -c $< -MM -MT $@ -MF $(OBJ_DIR)/$(notdir $(patsubst %.o,%.d,$@)) + cp $@ $(OBJ_DIR)/$(notdir $@) + cp $*_$(TARGET).i $(INFO_DIR) + cp $*_$(TARGET).s $(INFO_DIR) + chmod 777 $(OBJ_DIR)/$(notdir $@) + +-include $(DEPENDENCY_LIST) + +.PHONY: clean +clean: + rm -rf $(TARGET) + rm -f $(SRC_O) $(DRAM_O) $(VER_O) $(SRC_OO) + rm -f $(patsubst %.o,%.d,$(SRC_O)) $(patsubst %.o,%.d,$(DRAM_O)) $(patsubst %.o,%.d,$(VER_O)) $(patsubst %.oo,%.d,$(SRC_OO)) + rm -f $(patsubst %.o,%.su,$(SRC_O)) $(patsubst %.o,%.su,$(DRAM_O)) $(patsubst %.o,%.su,$(VER_O)) $(patsubst %.oo,%.su,$(SRC_OO)) + rm -f $(patsubst %.o,%.i,$(SRC_O)) $(patsubst %.o,%.i,$(DRAM_O)) $(patsubst %.o,%.i,$(VER_O)) $(patsubst %.oo,%.ii,$(SRC_OO)) + rm -f $(patsubst %.o,%.s,$(SRC_O)) $(patsubst %.o,%.s,$(DRAM_O)) $(patsubst %.o,%.s,$(VER_O)) $(patsubst %.oo,%.s,$(SRC_OO)) + rm -f *.i + rm -f *.s + rm -f $(VER_C) diff --git a/component/common/application/matter/example/fan/matter_drivers.cpp b/component/common/application/matter/example/fan/matter_drivers.cpp new file mode 100644 index 00000000..97f8d047 --- /dev/null +++ b/component/common/application/matter/example/fan/matter_drivers.cpp @@ -0,0 +1,121 @@ +#include "matter_drivers.h" +#include "matter_interaction.h" +#include "fan_driver.h" + +#include +#include +#include +#include + +using namespace ::chip::app; + +#define PWM_PIN PA_23 + +MatterFan fan; + +// Set identify cluster and its callback on ep1 +static Identify gIdentify1 = { + chip::EndpointId{ 1 }, matter_driver_on_identify_start, matter_driver_on_identify_stop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, matter_driver_on_trigger_effect, +}; + +CHIP_ERROR matter_driver_fan_init() +{ + fan.Init(PWM_PIN); + return CHIP_NO_ERROR; +} + +CHIP_ERROR matter_driver_fan_set_startup_value() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + EmberAfStatus status; + DataModel::Nullable FanPercentSettingValue; + chip::app::Clusters::FanControl::FanModeEnum FanModeValue; + + chip::DeviceLayer::PlatformMgr().LockChipStack(); + status = Clusters::FanControl::Attributes::PercentSetting::Get(1, FanPercentSettingValue); + VerifyOrExit(status == EMBER_ZCL_STATUS_SUCCESS, err = CHIP_ERROR_INTERNAL); + status = Clusters::FanControl::Attributes::FanMode::Get(1, &FanModeValue); + VerifyOrExit(status == EMBER_ZCL_STATUS_SUCCESS, err = CHIP_ERROR_INTERNAL); + + // Set fan speed to percent setting value + fan.setFanSpeedPercent(FanPercentSettingValue.Value()); + fan.setFanMode((uint8_t) FanModeValue); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + +exit: + if (err == CHIP_ERROR_INTERNAL) + { + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + } + return err; +} + +void matter_driver_on_identify_start(Identify * identify) +{ + ChipLogProgress(Zcl, "OnIdentifyStart"); +} + +void matter_driver_on_identify_stop(Identify * identify) +{ + ChipLogProgress(Zcl, "OnIdentifyStop"); +} + +void matter_driver_on_trigger_effect(Identify * identify) +{ + switch (identify->mCurrentEffectIdentifier) + { + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); + break; + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); + break; + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); + break; + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + return; + } +} + +void matter_driver_uplink_update_handler(AppEvent *aEvent) +{ + chip::app::ConcreteAttributePath path = aEvent->path; + EmberAfStatus status; + DataModel::Nullable FanPercentSettingValue; + + // this example only considers endpoint 1 + VerifyOrExit(aEvent->path.mEndpointId == 1, + ChipLogError(DeviceLayer, "Unexpected EndPoint ID: `0x%02x'", path.mEndpointId)); + + switch(path.mClusterId) + { + case Clusters::OnOff::Id: + if (path.mAttributeId == Clusters::OnOff::Attributes::OnOff::Id) + { + fan.setFanMode((aEvent->value._u8 == 1) ? 4 /* kOn */ : 0 /* kOff */); + chip::DeviceLayer::PlatformMgr().LockChipStack(); + Clusters::FanControl::Attributes::FanMode::Set(1, (aEvent->value._u8 == 1) ? Clusters::FanControl::FanModeEnum::kOn : Clusters::FanControl::FanModeEnum::kOff); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + } + case Clusters::FanControl::Id: + if (path.mAttributeId == Clusters::FanControl::Attributes::PercentSetting::Id) + { + fan.setFanSpeedPercent(aEvent->value._u8); + } + else if (path.mAttributeId == Clusters::FanControl::Attributes::FanMode::Id) + { + fan.setFanMode(aEvent->value._u8); + } + break; + case Clusters::Identify::Id: + break; + } + +exit: + return; +} diff --git a/component/common/application/matter/example/fan/matter_drivers.h b/component/common/application/matter/example/fan/matter_drivers.h new file mode 100644 index 00000000..71b35f51 --- /dev/null +++ b/component/common/application/matter/example/fan/matter_drivers.h @@ -0,0 +1,15 @@ +#pragma once + +#include "matter_events.h" + +#include +#include + +CHIP_ERROR matter_driver_fan_init(void); +CHIP_ERROR matter_driver_fan_set_startup_value(void); +CHIP_ERROR matter_driver_temphumsensor_init(); +CHIP_ERROR matter_driver_temphumsensor_start(); +void matter_driver_on_identify_start(Identify * identify); +void matter_driver_on_identify_stop(Identify * identify); +void matter_driver_on_trigger_effect(Identify * identify); +void matter_driver_uplink_update_handler(AppEvent * event); diff --git a/component/common/example/example_entry.c b/component/common/example/example_entry.c index 8ea2126b..f05417f4 100644 --- a/component/common/example/example_entry.c +++ b/component/common/example/example_entry.c @@ -375,6 +375,8 @@ #include #elif defined(CONFIG_EXAMPLE_MATTER_DISHWASHER) && (CONFIG_EXAMPLE_MATTER_DISHWASHER == 1) #include +#elif defined(CONFIG_EXAMPLE_MATTER_FAN) && (CONFIG_EXAMPLE_MATTER_FAN == 1) +#include #endif #endif @@ -877,6 +879,9 @@ example_hilink(); #elif defined(CONFIG_EXAMPLE_MATTER_DISHWASHER) && (CONFIG_EXAMPLE_MATTER_DISHWASHER == 1) extern void example_matter_dishwasher(); example_matter_dishwasher(); +#elif defined(CONFIG_EXAMPLE_MATTER_FAN) && (CONFIG_EXAMPLE_MATTER_FAN == 1) + extern void example_matter_fan(); + example_matter_fan(); #endif #endif diff --git a/project/realtek_amebaz2_v0_example/inc/platform_opts.h b/project/realtek_amebaz2_v0_example/inc/platform_opts.h index 576ef7a1..f3c027bb 100644 --- a/project/realtek_amebaz2_v0_example/inc/platform_opts.h +++ b/project/realtek_amebaz2_v0_example/inc/platform_opts.h @@ -89,15 +89,16 @@ #define CONFIG_LINKKIT_AWSS 0//on or off for ali feiyan cloud /* For Matter */ -#define CONFIG_EXAMPLE_MATTER 1 -#define CONFIG_EXAMPLE_MATTER_CHIPTEST 1 -#define CONFIG_EXAMPLE_MATTER_LIGHT 0 -#define CONFIG_EXAMPLE_MATTER_THERMOSTAT 0 -#define CONFIG_EXAMPLE_MATTER_AIRCON 0 -#define CONFIG_EXAMPLE_MATTER_LAUNDRY_WASHER 0 -#define CONFIG_EXAMPLE_MATTER_REFRIGERATOR 0 -#define CONFIG_EXAMPLE_MATTER_BRIDGE 0 -#define CONFIG_EXAMPLE_MATTER_DISHWASHER 0 +#define CONFIG_EXAMPLE_MATTER 1 +#define CONFIG_EXAMPLE_MATTER_CHIPTEST 1 +#define CONFIG_EXAMPLE_MATTER_LIGHT 0 +#define CONFIG_EXAMPLE_MATTER_THERMOSTAT 0 +#define CONFIG_EXAMPLE_MATTER_AIRCON 0 +#define CONFIG_EXAMPLE_MATTER_LAUNDRY_WASHER 0 +#define CONFIG_EXAMPLE_MATTER_REFRIGERATOR 0 +#define CONFIG_EXAMPLE_MATTER_BRIDGE 0 +#define CONFIG_EXAMPLE_MATTER_DISHWASHER 0 +#define CONFIG_EXAMPLE_MATTER_FAN 0 /* For WPS and P2P */ #define CONFIG_ENABLE_WPS 0