ieee802154: fix a typo in set_channel API

This commit is contained in:
Shu Chen
2023-05-15 20:52:31 +08:00
committed by zhangwenxu
parent 82c6c8149c
commit 6ba1c6c44f
8 changed files with 11 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ uint8_t esp_ieee802154_get_channel(void)
return ieee802154_pib_get_channel(); 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); ieee802154_pib_set_channel(channel);
return ESP_OK; return ESP_OK;

View File

@@ -51,7 +51,7 @@ uint8_t esp_ieee802154_get_channel(void);
* - ESP_OK on success. * - ESP_OK on success.
* - ESP_FAIL on failure. * - 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. * @brief Get the transmit power.

View File

@@ -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 * SPDX-License-Identifier: Unlicense OR CC0-1.0
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "esp_system.h" #include "esp_system.h"
@@ -119,7 +120,7 @@ static int process_channel(int argc, char **argv)
ESP_LOGI(TAG, "current channel: %d", channel); ESP_LOGI(TAG, "current channel: %d", channel);
} else if (channel_args.set_channel->count) { } else if (channel_args.set_channel->count) {
uint8_t channel = channel_args.set_channel->ival[0]; 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); ESP_LOGI(TAG, "set channel: %d", channel);
} else { } else {
ESP_LOGE(TAG, "no valid arguments"); ESP_LOGE(TAG, "no valid arguments");

View File

@@ -287,7 +287,7 @@ otError otPlatRadioSleep(otInstance *aInstance)
otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel) otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
{ {
esp_ieee802154_set_channnel(aChannel); esp_ieee802154_set_channel(aChannel);
esp_ieee802154_receive(); esp_ieee802154_receive();
return OT_ERROR_NONE; return OT_ERROR_NONE;
@@ -295,7 +295,7 @@ otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame) 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); aFrame->mPsdu[-1] = aFrame->mLength; // lenth locates one byte before the psdu (esp_openthread_radio_tx_psdu);

View File

@@ -1,6 +1,6 @@
## IDF Component Manager Manifest File ## IDF Component Manager Manifest File
dependencies: dependencies:
espressif/esp-zboss-lib: "~0.3.0" espressif/esp-zboss-lib: "~0.4.0"
espressif/esp-zigbee-lib: "~0.5.0" espressif/esp-zigbee-lib: "~0.5.0"
## Required IDF version ## Required IDF version
idf: idf:

View File

@@ -1,6 +1,6 @@
## IDF Component Manager Manifest File ## IDF Component Manager Manifest File
dependencies: dependencies:
espressif/esp-zboss-lib: "~0.3.0" espressif/esp-zboss-lib: "~0.4.0"
espressif/esp-zigbee-lib: "~0.5.0" espressif/esp-zigbee-lib: "~0.5.0"
## Required IDF version ## Required IDF version
idf: idf:

View File

@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File ## IDF Component Manager Manifest File
dependencies: dependencies:
espressif/esp-zigbee-lib: "~0.5.0" 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" espressif/led_strip: "~2.0.0"
## Required IDF version ## Required IDF version
idf: idf:

View File

@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File ## IDF Component Manager Manifest File
dependencies: dependencies:
espressif/esp-zigbee-lib: "~0.5.0" espressif/esp-zigbee-lib: "~0.5.0"
espressif/esp-zboss-lib: "~0.3.0" espressif/esp-zboss-lib: "~0.4.0"
## Required IDF version ## Required IDF version
idf: idf:
version: ">=5.0.0" version: ">=5.0.0"