diff --git a/components/esp8266/driver/uart.c b/components/esp8266/driver/uart.c index 66841ffa..728c8458 100644 --- a/components/esp8266/driver/uart.c +++ b/components/esp8266/driver/uart.c @@ -917,7 +917,7 @@ esp_err_t uart_flush_input(uart_port_t uart_num) return ESP_OK; } -esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t *uart_queue) +esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t *uart_queue, int no_use) { esp_err_t r; UART_CHECK((uart_num < UART_NUM_MAX), "uart_num error", ESP_ERR_INVALID_ARG); diff --git a/components/esp8266/include/driver/uart.h b/components/esp8266/include/driver/uart.h index 9c1069be..39f256a3 100644 --- a/components/esp8266/include/driver/uart.h +++ b/components/esp8266/include/driver/uart.h @@ -422,12 +422,13 @@ esp_err_t uart_intr_config(uart_port_t uart_num, uart_intr_config_t *uart_intr_c * @param queue_size UART event queue size/depth. * @param uart_queue UART event queue handle (out param). On success, a new queue handle is written here to provide * access to UART events. If set to NULL, driver will not use an event queue. - * + * @param no_use Invalid parameters, just to fit some modules. + * * @return * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t *uart_queue); +esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t *uart_queue, int no_use); /** * @brief Uninstall UART driver. diff --git a/examples/peripherals/uart_echo/main/uart_echo_example_main.c b/examples/peripherals/uart_echo/main/uart_echo_example_main.c index d503a28e..675bca86 100644 --- a/examples/peripherals/uart_echo/main/uart_echo_example_main.c +++ b/examples/peripherals/uart_echo/main/uart_echo_example_main.c @@ -46,7 +46,7 @@ static void echo_task() .flow_ctrl = UART_HW_FLOWCTRL_DISABLE }; uart_param_config(UART_NUM_0, &uart_config); - uart_driver_install(UART_NUM_0, BUF_SIZE * 2, 0, 0, NULL); + uart_driver_install(UART_NUM_0, BUF_SIZE * 2, 0, 0, NULL, 0); // Configure a temporary buffer for the incoming data uint8_t *data = (uint8_t *) malloc(BUF_SIZE); diff --git a/examples/peripherals/uart_events/main/uart_events_example_main.c b/examples/peripherals/uart_events/main/uart_events_example_main.c index fa13130e..814490b7 100644 --- a/examples/peripherals/uart_events/main/uart_events_example_main.c +++ b/examples/peripherals/uart_events/main/uart_events_example_main.c @@ -120,7 +120,7 @@ void app_main() uart_param_config(EX_UART_NUM, &uart_config); // Install UART driver, and get the queue. - uart_driver_install(EX_UART_NUM, BUF_SIZE * 2, BUF_SIZE * 2, 100, &uart0_queue); + uart_driver_install(EX_UART_NUM, BUF_SIZE * 2, BUF_SIZE * 2, 100, &uart0_queue, 0); // Create a task to handler UART event from ISR xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, 12, NULL); diff --git a/examples/peripherals/uart_select/main/uart_select_example_main.c b/examples/peripherals/uart_select/main/uart_select_example_main.c index aa589311..e3fddf7b 100644 --- a/examples/peripherals/uart_select/main/uart_select_example_main.c +++ b/examples/peripherals/uart_select/main/uart_select_example_main.c @@ -30,7 +30,7 @@ static void uart_select_task() .flow_ctrl = UART_HW_FLOWCTRL_DISABLE }; uart_param_config(UART_NUM_0, &uart_config); - uart_driver_install(UART_NUM_0, 2*1024, 0, 0, NULL); + uart_driver_install(UART_NUM_0, 2*1024, 0, 0, NULL, 0); while (1) { int fd; diff --git a/examples/system/console/main/console_example_main.c b/examples/system/console/main/console_example_main.c index 11a4f9ad..89682545 100644 --- a/examples/system/console/main/console_example_main.c +++ b/examples/system/console/main/console_example_main.c @@ -56,7 +56,7 @@ static void initialize_console() /* Install UART driver for interrupt-driven reads and writes */ ESP_ERROR_CHECK( uart_driver_install(CONFIG_CONSOLE_UART_NUM, - 256, 0, 0, NULL) ); + 256, 0, 0, NULL, 0) ); /* Tell VFS to use UART driver */ esp_vfs_dev_uart_use_driver(CONFIG_CONSOLE_UART_NUM); diff --git a/examples/system/factory-test/main/main.c b/examples/system/factory-test/main/main.c index 772bd35d..2adcdfc5 100644 --- a/examples/system/factory-test/main/main.c +++ b/examples/system/factory-test/main/main.c @@ -52,7 +52,7 @@ static void initialize_console() /* Install UART driver for interrupt-driven reads and writes */ ESP_ERROR_CHECK(uart_driver_install(CONFIG_CONSOLE_UART_NUM, - 256, 0, 0, NULL)); + 256, 0, 0, NULL, 0)); /* Tell VFS to use UART driver */ esp_vfs_dev_uart_use_driver(CONFIG_CONSOLE_UART_NUM);