From dc848707dba1755ed3a494b0a5549babfc2a09f5 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Mon, 15 May 2023 20:52:31 +0800 Subject: [PATCH] ieee802154: fix a typo in set_channel API --- components/ieee802154/esp_ieee802154.c | 2 +- components/ieee802154/include/esp_ieee802154.h | 2 +- .../test_apps/test_ieee802154/main/src/ieee802154_cmd.c | 5 +++-- components/openthread/port/esp_openthread_radio.c | 4 ++-- examples/zigbee/esp_zigbee_gateway/main/idf_component.yml | 2 +- examples/zigbee/esp_zigbee_rcp/main/idf_component.yml | 2 +- .../light_sample/HA_on_off_light/main/idf_component.yml | 2 +- .../light_sample/HA_on_off_switch/main/idf_component.yml | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/ieee802154/esp_ieee802154.c b/components/ieee802154/esp_ieee802154.c index ac971d52263..1bcd4a2ebda 100644 --- a/components/ieee802154/esp_ieee802154.c +++ b/components/ieee802154/esp_ieee802154.c @@ -38,7 +38,7 @@ uint8_t esp_ieee802154_get_channel(void) return ieee802154_pib_get_channel(); } -esp_err_t esp_ieee802154_set_channnel(uint8_t channel) +esp_err_t esp_ieee802154_set_channel(uint8_t channel) { ieee802154_pib_set_channel(channel); return ESP_OK; diff --git a/components/ieee802154/include/esp_ieee802154.h b/components/ieee802154/include/esp_ieee802154.h index f814fe1fa0a..96de1a07758 100644 --- a/components/ieee802154/include/esp_ieee802154.h +++ b/components/ieee802154/include/esp_ieee802154.h @@ -51,7 +51,7 @@ uint8_t esp_ieee802154_get_channel(void); * - ESP_OK on success. * - ESP_FAIL on failure. */ -esp_err_t esp_ieee802154_set_channnel(uint8_t channel); +esp_err_t esp_ieee802154_set_channel(uint8_t channel); /** * @brief Get the transmit power. diff --git a/components/ieee802154/test_apps/test_ieee802154/main/src/ieee802154_cmd.c b/components/ieee802154/test_apps/test_ieee802154/main/src/ieee802154_cmd.c index a4b23c14c66..bf714b5a843 100644 --- a/components/ieee802154/test_apps/test_ieee802154/main/src/ieee802154_cmd.c +++ b/components/ieee802154/test_apps/test_ieee802154/main/src/ieee802154_cmd.c @@ -1,8 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ + #include #include #include "esp_system.h" @@ -119,7 +120,7 @@ static int process_channel(int argc, char **argv) ESP_LOGI(TAG, "current channel: %d", channel); } else if (channel_args.set_channel->count) { uint8_t channel = channel_args.set_channel->ival[0]; - esp_ieee802154_set_channnel(channel); + esp_ieee802154_set_channel(channel); ESP_LOGI(TAG, "set channel: %d", channel); } else { ESP_LOGE(TAG, "no valid arguments"); diff --git a/components/openthread/port/esp_openthread_radio.c b/components/openthread/port/esp_openthread_radio.c index 892df418621..80f8020f9f2 100644 --- a/components/openthread/port/esp_openthread_radio.c +++ b/components/openthread/port/esp_openthread_radio.c @@ -287,7 +287,7 @@ otError otPlatRadioSleep(otInstance *aInstance) otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel) { - esp_ieee802154_set_channnel(aChannel); + esp_ieee802154_set_channel(aChannel); esp_ieee802154_receive(); return OT_ERROR_NONE; @@ -295,7 +295,7 @@ otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel) otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame) { - esp_ieee802154_set_channnel(aFrame->mChannel); + esp_ieee802154_set_channel(aFrame->mChannel); aFrame->mPsdu[-1] = aFrame->mLength; // lenth locates one byte before the psdu (esp_openthread_radio_tx_psdu); diff --git a/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml b/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml index fcc36a272eb..5ce0cb5c75a 100644 --- a/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml +++ b/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml @@ -1,6 +1,6 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~0.3.0" + espressif/esp-zboss-lib: "~0.4.0" espressif/esp-zigbee-lib: "~0.5.0" ## Required IDF version idf: diff --git a/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml b/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml index fcc36a272eb..5ce0cb5c75a 100644 --- a/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml +++ b/examples/zigbee/esp_zigbee_rcp/main/idf_component.yml @@ -1,6 +1,6 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~0.3.0" + espressif/esp-zboss-lib: "~0.4.0" espressif/esp-zigbee-lib: "~0.5.0" ## Required IDF version idf: 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 8f8c2eac9a2..b4e6b4d0842 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,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: espressif/esp-zigbee-lib: "~0.5.0" - espressif/esp-zboss-lib: "~0.3.0" + espressif/esp-zboss-lib: "~0.4.0" espressif/led_strip: "~2.0.0" ## Required IDF version idf: 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 32ebdf19f72..c91d6de0812 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,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: espressif/esp-zigbee-lib: "~0.5.0" - espressif/esp-zboss-lib: "~0.3.0" + espressif/esp-zboss-lib: "~0.4.0" ## Required IDF version idf: version: ">=5.0.0"