Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_typo_set_channel' into 'master'
Browse files Browse the repository at this point in the history
ieee802154: fix a typo in set_channel API

See merge request espressif/esp-idf!23760
  • Loading branch information
zwx1995esp committed May 18, 2023
2 parents d7a141f + dc84870 commit 8c5a395
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/ieee802154/esp_ieee802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/ieee802154/include/esp_ieee802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <stdio.h>
#include <string.h>
#include "esp_system.h"
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions components/openthread/port/esp_openthread_radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,15 @@ 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;
}

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);

Expand Down
2 changes: 1 addition & 1 deletion examples/zigbee/esp_zigbee_gateway/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion examples/zigbee/esp_zigbee_rcp/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 8c5a395

Please sign in to comment.