feature: Add uart hal support.

This commit is contained in:
houwenxiang
2019-04-17 20:19:44 +08:00
committed by kooho
parent 1dd2443758
commit f27ae9b0e2
44 changed files with 3281 additions and 976 deletions

View File

@@ -41,12 +41,11 @@ static void initialize_console(void)
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.use_ref_tick = true
.source_clk = UART_SCLK_REF_TICK,
};
ESP_ERROR_CHECK(uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config));
/* Install UART driver for interrupt-driven reads and writes */
ESP_ERROR_CHECK(uart_driver_install(CONFIG_ESP_CONSOLE_UART_NUM, 256, 0, 0, NULL, 0));
ESP_ERROR_CHECK(uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config));
/* Tell VFS to use UART driver */
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);