mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-15 08:32:42 +08:00
feature(uart_driver_install): To fit some modules, add invalid parameters in uart_driver_install
This commit is contained in:
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user