From 4f4c9030fd284e79eed46aa403fb9ec5efba84a8 Mon Sep 17 00:00:00 2001 From: Wangjialin Date: Thu, 10 Nov 2016 17:01:39 +0800 Subject: [PATCH] Fix uart tx bug, data pass(with flow control) through test ok. --- components/driver/uart.c | 2 +- components/esp32/include/esp_err.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/driver/uart.c b/components/driver/uart.c index b961fbed71..d9e3fd64ca 100644 --- a/components/driver/uart.c +++ b/components/driver/uart.c @@ -729,7 +729,7 @@ static int uart_tx_all(uart_port_t uart_num, const char* src, size_t size, bool } else { evt.type = UART_DATA; } - xRingbufferSend(p_uart_obj[uart_num]->tx_ring_buf, (void*) &evt, sizeof(uart_event_t), portMAX_DELAY); + xRingbufferSend(p_uart_obj[uart_num]->tx_ring_buf, (void*) &evt, sizeof(uart_tx_data_t), portMAX_DELAY); while(size > 0) { int send_size = size > max_size / 2 ? max_size / 2 : size; xRingbufferSend(p_uart_obj[uart_num]->tx_ring_buf, (void*) (src + offset), send_size, portMAX_DELAY); diff --git a/components/esp32/include/esp_err.h b/components/esp32/include/esp_err.h index f8271ba259..a1f4b8f359 100644 --- a/components/esp32/include/esp_err.h +++ b/components/esp32/include/esp_err.h @@ -34,6 +34,8 @@ typedef int32_t esp_err_t; #define ESP_ERR_INVALID_SIZE 0x104 #define ESP_ERR_NOT_FOUND 0x105 #define ESP_ERR_NOT_SUPPORTED 0x106 +#define ESP_ERR_TIMEOUT 0x107 + #define ESP_ERR_WIFI_BASE 0x3000 /*!< Starting number of WiFi error codes */ -- 2.40.0