Skip to content

Commit b96fbd8

Browse files
committed
Merge branch 'feature/br_board_usb_init_refactor' into 'main'
feat(BR): USB console init refactor See merge request espressif/esp-thread-br!87
2 parents 43d3326 + 2cda31a commit b96fbd8

File tree

8 files changed

+12
-74
lines changed

8 files changed

+12
-74
lines changed

docs/en/dev-guide/build_and_run.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Clone the `esp-idf <https://github.com/espressif/esp-idf>`_ and the `esp-thread-
1111

1212
.. code-block:: bash
1313
14-
git clone -b v5.1.1 --recursive https://github.com/espressif/esp-idf.git
14+
git clone -b v5.1.2 --recursive https://github.com/espressif/esp-idf.git
1515
1616
.. code-block:: bash
1717

examples/basic_thread_border_router/main/esp_ot_config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
.target_chip = ESP32H2_CHIP, \
7878
}
7979

80+
#if CONFIG_OPENTHREAD_CONSOLE_TYPE_UART
8081
#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \
8182
{ \
8283
.host_connection_mode = HOST_CONNECTION_MODE_CLI_UART, \
@@ -96,6 +97,13 @@
9697
.tx_pin = UART_PIN_NO_CHANGE, \
9798
}, \
9899
}
100+
#elif CONFIG_OPENTHREAD_CONSOLE_TYPE_USB_SERIAL_JTAG
101+
#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \
102+
{ \
103+
.host_connection_mode = HOST_CONNECTION_MODE_CLI_USB, \
104+
.host_usb_config = USB_SERIAL_JTAG_DRIVER_CONFIG_DEFAULT(), \
105+
}
106+
#endif
99107

100108
#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \
101109
{ \

examples/basic_thread_border_router/sdkconfig.defaults

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ CONFIG_OPENTHREAD_ENABLED=y
5252
CONFIG_OPENTHREAD_BORDER_ROUTER=y
5353
CONFIG_OPENTHREAD_TREL=y
5454
CONFIG_OPENTHREAD_CLI_OTA=y
55+
CONFIG_OPENTHREAD_CONSOLE_TYPE_USB_SERIAL_JTAG=y
5556
# end of OpenThread
5657

5758
#
@@ -107,4 +108,4 @@ CONFIG_EXAMPLE_ETH_SPI_CLOCK_MHZ=36
107108
CONFIG_EXAMPLE_ETH_SPI_INT_GPIO=39
108109
CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=40
109110
CONFIG_EXAMPLE_ETH_PHY_ADDR=1
110-
# end of Etherenet
111+
# end of Etherenet

examples/common/border_router_board/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/common/border_router_board/include/border_router_board.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/common/border_router_board/src/border_router_board.c

Lines changed: 0 additions & 47 deletions
This file was deleted.

examples/common/thread_border_router/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(requires esp_ot_cli_extension openthread vfs border_router_board)
1+
set(requires esp_ot_cli_extension openthread vfs)
22

33
if(CONFIG_OPENTHREAD_CLI_OTA)
44
list(APPEND requires esp_http_client esp_br_http_ota)

examples/common/thread_border_router/src/border_router_launch.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77

88
#include "border_router_launch.h"
9-
#include "border_router_board.h"
109

1110
#include <assert.h>
1211
#include <stdio.h>
@@ -94,7 +93,6 @@ static void ot_task_worker(void *ctx)
9493
assert(openthread_netif != NULL);
9594

9695
// Initialize the OpenThread stack
97-
ESP_ERROR_CHECK(border_router_board_init());
9896
esp_openthread_register_rcp_failure_handler(rcp_failure_handler);
9997
ESP_ERROR_CHECK(esp_openthread_init(&s_openthread_platform_config));
10098

0 commit comments

Comments
 (0)