1 /* OpenThread Border Router Example 2 3 This example code is in the Public Domain (or CC0 licensed, at your option.) 4 5 Unless required by applicable law or agreed to in writing, this 6 software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 7 CONDITIONS OF ANY KIND, either express or implied. 8 */ 9 10 #pragma once 11 12 #include "esp_openthread_types.h" 13 14 #define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ 15 { \ 16 .radio_mode = RADIO_MODE_UART_RCP, \ 17 .radio_uart_config = { \ 18 .port = 1, \ 19 .uart_config = \ 20 { \ 21 .baud_rate = 115200, \ 22 .data_bits = UART_DATA_8_BITS, \ 23 .parity = UART_PARITY_DISABLE, \ 24 .stop_bits = UART_STOP_BITS_1, \ 25 .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ 26 .rx_flow_ctrl_thresh = 0, \ 27 .source_clk = UART_SCLK_APB, \ 28 }, \ 29 .rx_pin = 4, \ 30 .tx_pin = 5, \ 31 }, \ 32 } 33 34 #define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ 35 { \ 36 .host_connection_mode = HOST_CONNECTION_MODE_CLI_UART, \ 37 .host_uart_config = { \ 38 .port = 0, \ 39 .uart_config = \ 40 { \ 41 .baud_rate = 115200, \ 42 .data_bits = UART_DATA_8_BITS, \ 43 .parity = UART_PARITY_DISABLE, \ 44 .stop_bits = UART_STOP_BITS_1, \ 45 .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ 46 .rx_flow_ctrl_thresh = 0, \ 47 .source_clk = UART_SCLK_APB, \ 48 }, \ 49 .rx_pin = UART_PIN_NO_CHANGE, \ 50 .tx_pin = UART_PIN_NO_CHANGE, \ 51 }, \ 52 } 53 54 #define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ 55 { \ 56 .storage_partition_name = "ot_storage", \ 57 .netif_queue_size = 10, \ 58 .task_queue_size = 10, \ 59 } 60