mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 10:00:57 +02:00
feat(zigbee): move the zcl_utility into the examples_utils of zb_common_components
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRC_DIRS "." "../../../common/zcl_utility/src"
|
SRC_DIRS "."
|
||||||
INCLUDE_DIRS "." "../../../common/zcl_utility/include"
|
INCLUDE_DIRS "."
|
||||||
)
|
)
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "ha/esp_zigbee_ha_standard.h"
|
#include "ha/esp_zigbee_ha_standard.h"
|
||||||
|
#include "zcl_utility.h"
|
||||||
#include "esp_zb_light.h"
|
#include "esp_zb_light.h"
|
||||||
|
|
||||||
#if !defined ZB_ED_ROLE
|
#if !defined ZB_ED_ROLE
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#include "esp_zigbee_core.h"
|
#include "esp_zigbee_core.h"
|
||||||
#include "light_driver.h"
|
#include "light_driver.h"
|
||||||
#include "zcl_utility.h"
|
|
||||||
|
|
||||||
/* Zigbee configuration */
|
/* Zigbee configuration */
|
||||||
#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */
|
#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */
|
||||||
|
@@ -6,3 +6,5 @@ dependencies:
|
|||||||
## Required IDF version
|
## Required IDF version
|
||||||
idf:
|
idf:
|
||||||
version: ">=5.0.0"
|
version: ">=5.0.0"
|
||||||
|
examples_utils:
|
||||||
|
path: ${IDF_PATH}/examples/zigbee/zb_common_components/examples_utils
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRC_DIRS "." "../../../common/zcl_utility/src"
|
SRC_DIRS "."
|
||||||
INCLUDE_DIRS "." "../../../common/zcl_utility/include"
|
INCLUDE_DIRS "."
|
||||||
)
|
)
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
#include "ha/esp_zigbee_ha_standard.h"
|
#include "ha/esp_zigbee_ha_standard.h"
|
||||||
|
#include "zcl_utility.h"
|
||||||
#include "esp_zb_switch.h"
|
#include "esp_zb_switch.h"
|
||||||
|
|
||||||
#if defined ZB_ED_ROLE
|
#if defined ZB_ED_ROLE
|
||||||
|
@@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "esp_zigbee_core.h"
|
#include "esp_zigbee_core.h"
|
||||||
#include "switch_driver.h"
|
#include "switch_driver.h"
|
||||||
#include "zcl_utility.h"
|
|
||||||
|
|
||||||
/* Zigbee configuration */
|
/* Zigbee configuration */
|
||||||
#define MAX_CHILDREN 10 /* the max amount of connected devices */
|
#define MAX_CHILDREN 10 /* the max amount of connected devices */
|
||||||
|
@@ -5,3 +5,5 @@ dependencies:
|
|||||||
## Required IDF version
|
## Required IDF version
|
||||||
idf:
|
idf:
|
||||||
version: ">=5.0.0"
|
version: ">=5.0.0"
|
||||||
|
examples_utils:
|
||||||
|
path: ${IDF_PATH}/examples/zigbee/zb_common_components/examples_utils
|
||||||
|
@@ -0,0 +1,3 @@
|
|||||||
|
idf_component_register(SRCS "zcl_utility.c"
|
||||||
|
INCLUDE_DIRS "include"
|
||||||
|
PRIV_REQUIRES espressif__esp-zigbee-lib)
|
@@ -1,27 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: LicenseRef-Included
|
* SPDX-License-Identifier: LicenseRef-Included
|
||||||
*
|
*
|
||||||
* Zigbee Common
|
* ZCL utility functions for Zigbee examples
|
||||||
*
|
*
|
||||||
* This example code is in the Public Domain (or CC0 licensed, at your option.)
|
* This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, this
|
* Unless required by applicable law or agreed to in writing, this
|
||||||
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||||
* CONDITIONS OF ANY KIND, either express or implied.
|
* CONDITIONS OF ANY KIND, either express or implied.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "esp_err.h"
|
||||||
|
#include "esp_zigbee_core.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
#include "esp_check.h"
|
|
||||||
#include "esp_zigbee_core.h"
|
|
||||||
|
|
||||||
/*! Maximum length of ManufacturerName string field */
|
/*! Maximum length of ManufacturerName string field */
|
||||||
#define ESP_ZB_ZCL_CLUSTER_ID_BASIC_MANUFACTURER_NAME_MAX_LEN 32
|
#define ESP_ZB_ZCL_CLUSTER_ID_BASIC_MANUFACTURER_NAME_MAX_LEN 32
|
||||||
|
|
||||||
@@ -37,9 +36,9 @@ typedef struct zcl_basic_manufacturer_info_s {
|
|||||||
/**
|
/**
|
||||||
* @brief Adds manufacturer information to the ZCL basic cluster of endpoint
|
* @brief Adds manufacturer information to the ZCL basic cluster of endpoint
|
||||||
*
|
*
|
||||||
* @param[in] ep_list The pointer to the endpoint list with @p endpoint_id
|
* @param ep_list The pointer to the endpoint list with @p endpoint_id
|
||||||
* @param[in] endpoint_id The endpoint identifier indicating where the ZCL basic cluster resides
|
* @param endpoint_id The endpoint identifier indicating where the ZCL basic cluster resides
|
||||||
* @param[in] info The pointer to the basic manufacturer information
|
* @param info The pointer to the basic manufacturer information, @see zcl_basic_manufacturer_info_t
|
||||||
* @return
|
* @return
|
||||||
* - ESP_OK: On success
|
* - ESP_OK: On success
|
||||||
* - ESP_ERR_INVALID_ARG: Invalid argument
|
* - ESP_ERR_INVALID_ARG: Invalid argument
|
@@ -1,21 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: LicenseRef-Included
|
* SPDX-License-Identifier: LicenseRef-Included
|
||||||
*
|
*
|
||||||
* Zigbee Common
|
* ZCL utility functions for Zigbee examples
|
||||||
*
|
*
|
||||||
* This example code is in the Public Domain (or CC0 licensed, at your option.)
|
* This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, this
|
* Unless required by applicable law or agreed to in writing, this
|
||||||
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||||
* CONDITIONS OF ANY KIND, either express or implied.
|
* CONDITIONS OF ANY KIND, either express or implied.
|
||||||
*/
|
*/
|
||||||
#include "esp_check.h"
|
|
||||||
#include "stdio.h"
|
|
||||||
#include "string.h"
|
|
||||||
#include "zcl_utility.h"
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "esp_check.h"
|
||||||
|
#include "esp_zigbee_core.h"
|
||||||
|
|
||||||
|
#include "zcl_utility.h"
|
||||||
|
|
||||||
static const char *TAG = "ZCL_UTILITY";
|
static const char *TAG = "ZCL_UTILITY";
|
||||||
|
|
Reference in New Issue
Block a user