Merge branch 'feature/add_support_for_c6_br' into 'master'

openthread:  enable br for esp32c2 and esp32c6

See merge request espressif/esp-idf!21935
This commit is contained in:
Shu Chen 2023-01-16 15:39:53 +08:00
commit 46a1165da1
5 changed files with 23 additions and 9 deletions

@ -1 +1 @@
Subproject commit 31136c18c6ed890f4a100f7713e3b04ae07702c6
Subproject commit 7d57b18006da6e182ddb87698abdced1566f3b56

View File

@ -1,12 +1,8 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
examples/openthread/ot_br:
disable:
- if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32c6"
temporary: true
reason: target(s) not supported yet
disable_test:
- if: IDF_TARGET in ["esp32", "esp32c3", "esp32s2", "esp32c6"]
- if: IDF_TARGET in ["esp32", "esp32c3", "esp32c2", "esp32c6", "esp32s2"]
temporary: true
reason: only test on esp32s3

View File

@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# OpenThread Border Router Example

View File

@ -205,7 +205,12 @@ void app_main(void)
// * task queue
// * border router
esp_vfs_eventfd_config_t eventfd_config = {
#if CONFIG_OPENTHREAD_RADIO_NATIVE
// * radio driver (A native radio device needs a eventfd for radio driver.)
.max_fds = 4,
#else
.max_fds = 3,
#endif
};
ESP_ERROR_CHECK(esp_vfs_eventfd_register(&eventfd_config));

View File

@ -16,6 +16,12 @@
#include "esp_openthread_types.h"
#if CONFIG_OPENTHREAD_RADIO_NATIVE
#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_NATIVE, \
}
#else
#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_UART_RCP, \
@ -35,6 +41,13 @@
.tx_pin = 5, \
}, \
}
#endif
#if CONFIG_IDF_TARGET_ESP32C2 && CONFIG_XTAL_FREQ_26
#define HOST_BAUD_RATE 74880
#else
#define HOST_BAUD_RATE 115200
#endif
#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \
{ \
@ -43,7 +56,7 @@
.port = 0, \
.uart_config = \
{ \
.baud_rate = 115200, \
.baud_rate = HOST_BAUD_RATE, \
.data_bits = UART_DATA_8_BITS, \
.parity = UART_PARITY_DISABLE, \
.stop_bits = UART_STOP_BITS_1, \