Parcourir la source

openthread: add the configurable option of uart buffer size

xieqinan il y a 2 ans
Parent
commit
1f664bb4f7

+ 8 - 0
components/openthread/Kconfig

@@ -150,4 +150,12 @@ menu "OpenThread"
         help
             Select this option to acquire NAT64 address from dns servers.
 
+    config OPENTHREAD_UART_BUFFER_SIZE
+        int "The uart received buffer size of openthread"
+        depends on OPENTHREAD_ENABLED
+        default 256
+        range 128 1024
+        help
+            Set the OpenThread UART buffer size.
+
 endmenu

+ 1 - 1
components/openthread/private_include/esp_openthread_common_macro.h

@@ -20,4 +20,4 @@
 #define US_PER_S (MS_PER_S * US_PER_MS)
 #endif
 
-#define ESP_OPENTHREAD_UART_BUFFER_SIZE (UART_FIFO_LEN * 2)
+#define ESP_OPENTHREAD_UART_BUFFER_SIZE CONFIG_OPENTHREAD_UART_BUFFER_SIZE

+ 1 - 1
examples/openthread/ot_br/main/esp_ot_config.h

@@ -29,7 +29,7 @@
             .port = 1,                                               \
             .uart_config =                                           \
                 {                                                    \
-                    .baud_rate = 115200,                             \
+                    .baud_rate = 460800,                             \
                     .data_bits = UART_DATA_8_BITS,                   \
                     .parity = UART_PARITY_DISABLE,                   \
                     .stop_bits = UART_STOP_BITS_1,                   \

+ 1 - 1
examples/openthread/ot_rcp/main/esp_ot_config.h

@@ -35,7 +35,7 @@
             .port = 0,                                          \
             .uart_config =                                      \
                 {                                               \
-                    .baud_rate =  115200,                       \
+                    .baud_rate =  460800,                       \
                     .data_bits = UART_DATA_8_BITS,              \
                     .parity = UART_PARITY_DISABLE,              \
                     .stop_bits = UART_STOP_BITS_1,              \