Merge branch 'update_idf_v5_0' into 'main'

example: Update idf branch for esp32h2 to the latest release/v5.0

See merge request app-frameworks/esp-matter!216
This commit is contained in:
Shu Chen
2022-10-31 18:04:57 +08:00
8 changed files with 7 additions and 36 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ git clone --recursive https://github.com/espressif/esp-matter.git
- This SDK currently works with [commit 4f7669b0](https://github.com/espressif/connectedhomeip/tree/4f7669b0) in v1.0 branch of connectedhomeip.
- For Wi-Fi devices (ESP32, ESP32-C3, ESP32-S3), ESP-IDF [v4.4.2 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.2) is required.
- For Thread devices (ESP32-H2) and Zigbee Bridge example, ESP-IDF release/v5.0 branch at [commit ccdeb43](https://github.com/espressif/esp-idf/tree/ccdeb43) should be used.
- For Thread devices (ESP32-H2) and Zigbee Bridge example, ESP-IDF release/v5.0 branch at [commit 20949d44](https://github.com/espressif/esp-idf/tree/20949d44) should be used.
## Documentation
@@ -8,5 +8,4 @@ SET(led_type ws2812)
SET(button_type iot)
SET(extra_components_dirs_append "$ENV{ESP_MATTER_DEVICE_PATH}/../../led_driver"
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/iot_button"
"$ENV{IDF_PATH}/examples/common_components/led_strip")
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/iot_button")
@@ -8,5 +8,4 @@ SET(led_type ws2812)
SET(button_type hollow_button)
SET(extra_components_dirs_append "$ENV{ESP_MATTER_DEVICE_PATH}/../../led_driver"
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/button"
"$ENV{IDF_PATH}/examples/common_components/led_strip")
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/button")
@@ -8,5 +8,4 @@ SET(led_type ws2812)
SET(button_type iot)
SET(extra_components_dirs_append "$ENV{ESP_MATTER_DEVICE_PATH}/../../led_driver"
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/iot_button"
"$ENV{IDF_PATH}/examples/common_components/led_strip")
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/iot_button")
+2
View File
@@ -0,0 +1,2 @@
dependencies:
espressif/led_strip: "^1.0.0"
-19
View File
@@ -28,7 +28,6 @@ led_driver_handle_t led_driver_init(led_driver_config_t *config)
{
ESP_LOGI(TAG, "Initializing light driver");
esp_err_t err = ESP_OK;
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
rmt_config_t rmt_cfg = RMT_DEFAULT_CONFIG_TX(config->gpio, config->channel);
rmt_cfg.clk_div = 2;
err = rmt_config(&rmt_cfg);
@@ -44,18 +43,6 @@ led_driver_handle_t led_driver_init(led_driver_config_t *config)
led_strip_config_t strip_config = LED_STRIP_DEFAULT_CONFIG(1, (led_strip_dev_t)rmt_cfg.channel);
led_strip_t *strip = led_strip_new_rmt_ws2812(&strip_config);
#else
led_strip_config_t strip_config = {
.strip_gpio_num = config->gpio,
.max_leds = 1,
};
led_strip_handle_t strip;
err = led_strip_new_rmt_device(&strip_config, &strip);
if (err != ESP_OK) {
ESP_LOGE(TAG, "led_strip initializing failed");
return NULL;
}
#endif
if (!strip) {
ESP_LOGE(TAG, "W2812 driver install failed");
return NULL;
@@ -76,7 +63,6 @@ esp_err_t led_driver_set_RGB(led_driver_handle_t handle)
ESP_LOGE(TAG, "led driver handle cannot be NULL");
err = ESP_FAIL;
} else {
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
led_strip_t *strip = (led_strip_t *)handle;
err = strip->set_pixel(strip, 0, mRGB.red, mRGB.green, mRGB.blue);
if (err != ESP_OK) {
@@ -85,11 +71,6 @@ esp_err_t led_driver_set_RGB(led_driver_handle_t handle)
}
ESP_LOGI(TAG, "led set r:%d, g:%d, b:%d", mRGB.red, mRGB.green, mRGB.blue);
err = strip->refresh(strip, 100);
#else
led_strip_handle_t strip = (led_strip_handle_t)handle;
err = led_strip_set_pixel(strip, 0, mRGB.red, mRGB.green, mRGB.blue);
err |= led_strip_refresh(strip);
#endif
if (err != ESP_OK) {
ESP_LOGE(TAG, "strip_refresh failed");
}
+1 -1
View File
@@ -41,7 +41,7 @@ The Prerequisites for ESP-IDF and Matter:
::
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf; git checkout ccdeb43cc7; git submodule update --init --recursive;
cd esp-idf; git checkout 20949d444f; git submodule update --init --recursive;
./install.sh
cd ..
@@ -39,7 +39,6 @@ void zboss_signal_handler(zb_bufid_t bufid)
zb_ret_t status = ZB_GET_APP_SIGNAL_STATUS(bufid);
zb_zdo_signal_device_annce_params_t *device_annce_params = NULL;
zb_zdo_signal_macsplit_dev_boot_params_t *rcp_version = NULL;
zb_uint32_t gateway_version;
switch (sig) {
case ZB_ZDO_SIGNAL_SKIP_STARTUP:
@@ -49,17 +48,9 @@ void zboss_signal_handler(zb_bufid_t bufid)
case ZB_MACSPLIT_DEVICE_BOOT:
ESP_LOGI(TAG, "Zigbee rcp device booted");
gateway_version = esp_zb_macsplit_get_version();
rcp_version = ZB_ZDO_SIGNAL_GET_PARAMS(p_sg_p, zb_zdo_signal_macsplit_dev_boot_params_t);
ESP_LOGI(TAG, "Zigbee rcp device version: %d.%d.%d", (rcp_version->dev_version >> 24 & 0x000000FF),
(rcp_version->dev_version >> 16 & 0x000000FF), (rcp_version->dev_version & 0x000000FF));
ESP_LOGI(TAG, "Zigbee gateway version: %d.%d.%d", (gateway_version >> 24 & 0x000000FF),
(gateway_version >> 16 & 0x000000FF), (gateway_version & 0x000000FF));
if (gateway_version != rcp_version->dev_version) {
ESP_LOGE(TAG,
"rcp has different Zigbee stack version with Zigbee gateway! Please check the rcp software or "
"other issues");
}
break;
case ZB_BDB_SIGNAL_DEVICE_FIRST_START: