CBU 模组matter开发问题
我的插排产品有三路开关。
tuya_app_main.c文件中endpoint数组是否可以配置为如下?
Code: Select all
MATTER_ENDPOINT_S app_ep_info[] =
{
{
APP_ENDPOINT_ID,
{
get_array_len(ep_device_type),
&ep_device_type[0]
},
ep_server_cluster_list,
get_array_len(ep_server_cluster_list),
NULL,
0
},
{
2,
{
get_array_len(ep_device_type),
&ep_device_type[0]
},
ep_server_cluster_list,
get_array_len(ep_server_cluster_list),
NULL,
0
},
{
3,
{
get_array_len(ep_device_type),
&ep_device_type[0]
},
ep_server_cluster_list,
get_array_len(ep_server_cluster_list),
NULL,
0
},
};
matter_attribute_callback如下:
Code: Select all
VOID_T matter_attribute_callback(UINT16_T endpoint_id, UINT32_T cluster_id, UINT32_T attribute_id, UINT8_T attr_type, UINT16_T size, UINT8_T *value)
{
switch (endpoint_id) {
case 1:
TAL_PR_NOTICE("*******************************"
"endpoint_id %d cluster:%d attribute %d type:%d, size %d value:0x%x",
endpoint_id,
cluster_id,
attribute_id,
attr_type,
size,
*value);
break;
case 2:
TAL_PR_NOTICE("**********************endpoint 2*************");
break;
case 3:
TAL_PR_NOTICE("**********************endpoint 3*************");
break;
default:
break;
}
}
目前的问题是:手机app点击开关按钮,只有第1路和第2路开关可以正常log,第3路不打印