From fde11f6e2b0e42237b27ba8e5a502cb005ee1f97 Mon Sep 17 00:00:00 2001 From: likunqiao Date: Wed, 11 Jan 2023 14:39:57 +0800 Subject: [PATCH] zigbee: example API update --- examples/zigbee/esp_zigbee_gateway/main/idf_component.yml | 2 +- examples/zigbee/esp_zigbee_gateway/partitions.csv | 4 ++-- examples/zigbee/esp_zigbee_rcp/main/idf_component.yml | 2 +- examples/zigbee/esp_zigbee_rcp/partitions.csv | 2 +- .../light_sample/HA_on_off_light/main/idf_component.yml | 2 +- examples/zigbee/light_sample/HA_on_off_light/partitions.csv | 4 ++-- .../light_sample/HA_on_off_switch/main/esp_zb_switch.c | 6 +++--- .../light_sample/HA_on_off_switch/main/idf_component.yml | 2 +- .../zigbee/light_sample/HA_on_off_switch/partitions.csv | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml b/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml index 38c15802934..fcc36a272eb 100644 --- a/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml +++ b/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: espressif/esp-zboss-lib: "~0.3.0" - espressif/esp-zigbee-lib: "~0.4.1" + espressif/esp-zigbee-lib: "~0.5.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/zigbee/esp_zigbee_gateway/partitions.csv b/examples/zigbee/esp_zigbee_gateway/partitions.csv index 7d42c87c517..d8dcfcdf6b5 100644 --- a/examples/zigbee/esp_zigbee_gateway/partitions.csv +++ b/examples/zigbee/esp_zigbee_gateway/partitions.csv @@ -3,5 +3,5 @@ nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, factory, app, factory, 0x10000, 550K, -zb_storage, data, fat, 0x9a000, 128K, -zb_fct, data, fat, 0xba000, 1K, +zb_storage, data, fat, 0x9a000, 16K, +zb_fct, data, fat, 0x9e000, 1K, diff --git a/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml b/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml index 38c15802934..fcc36a272eb 100644 --- a/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml +++ b/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: espressif/esp-zboss-lib: "~0.3.0" - espressif/esp-zigbee-lib: "~0.4.1" + espressif/esp-zigbee-lib: "~0.5.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/zigbee/esp_zigbee_rcp/partitions.csv b/examples/zigbee/esp_zigbee_rcp/partitions.csv index 2bf9c12396f..43c1fae4b56 100644 --- a/examples/zigbee/esp_zigbee_rcp/partitions.csv +++ b/examples/zigbee/esp_zigbee_rcp/partitions.csv @@ -3,4 +3,4 @@ nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, factory, app, factory, 0x10000, 550K, -zb_storage, data, fat, 0x9a000, 128K, +zb_storage, data, fat, 0x9a000, 16K, diff --git a/examples/zigbee/light_sample/HA_on_off_light/main/idf_component.yml b/examples/zigbee/light_sample/HA_on_off_light/main/idf_component.yml index 3d497601b91..8f8c2eac9a2 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/main/idf_component.yml +++ b/examples/zigbee/light_sample/HA_on_off_light/main/idf_component.yml @@ -1,6 +1,6 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zigbee-lib: "~0.4.1" + espressif/esp-zigbee-lib: "~0.5.0" espressif/esp-zboss-lib: "~0.3.0" espressif/led_strip: "~2.0.0" ## Required IDF version diff --git a/examples/zigbee/light_sample/HA_on_off_light/partitions.csv b/examples/zigbee/light_sample/HA_on_off_light/partitions.csv index 7d42c87c517..d8dcfcdf6b5 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/partitions.csv +++ b/examples/zigbee/light_sample/HA_on_off_light/partitions.csv @@ -3,5 +3,5 @@ nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, factory, app, factory, 0x10000, 550K, -zb_storage, data, fat, 0x9a000, 128K, -zb_fct, data, fat, 0xba000, 1K, +zb_storage, data, fat, 0x9a000, 16K, +zb_fct, data, fat, 0x9e000, 1K, diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c b/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c index 7ec811bfd4a..d51ae48aa06 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c @@ -91,9 +91,9 @@ static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask) ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask)); } -void user_find_cb(uint8_t zdo_status, uint16_t addr, uint8_t endpoint) +void user_find_cb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx) { - ESP_LOGI(TAG, "User find cb: address:0x%x, endpoint:%d, response_status:%d", addr, endpoint, zdo_status); + ESP_LOGI(TAG, "User find cb: response_status:%d, address:0x%x, endpoint:%d", zdo_status, addr, endpoint); if (zdo_status == ESP_ZB_ZDP_STATUS_SUCCESS) { on_off_light.endpoint = endpoint; on_off_light.short_addr = addr; @@ -145,7 +145,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) esp_zb_zdo_match_desc_req_param_t cmd_req; cmd_req.dst_nwk_addr = dev_annce_params->device_short_addr; cmd_req.addr_of_interest = dev_annce_params->device_short_addr; - esp_zb_zdo_find_on_off_light(&cmd_req, user_find_cb); + esp_zb_zdo_find_on_off_light(&cmd_req, user_find_cb, NULL); break; default: ESP_LOGI(TAG, "ZDO signal: %d, status: %d", sig_type, err_status); diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/idf_component.yml b/examples/zigbee/light_sample/HA_on_off_switch/main/idf_component.yml index 569fffc64b4..32ebdf19f72 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/idf_component.yml +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/idf_component.yml @@ -1,6 +1,6 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zigbee-lib: "~0.4.1" + espressif/esp-zigbee-lib: "~0.5.0" espressif/esp-zboss-lib: "~0.3.0" ## Required IDF version idf: diff --git a/examples/zigbee/light_sample/HA_on_off_switch/partitions.csv b/examples/zigbee/light_sample/HA_on_off_switch/partitions.csv index 7d42c87c517..d8dcfcdf6b5 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/partitions.csv +++ b/examples/zigbee/light_sample/HA_on_off_switch/partitions.csv @@ -3,5 +3,5 @@ nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, factory, app, factory, 0x10000, 550K, -zb_storage, data, fat, 0x9a000, 128K, -zb_fct, data, fat, 0xba000, 1K, +zb_storage, data, fat, 0x9a000, 16K, +zb_fct, data, fat, 0x9e000, 1K,