feature: Add uart hal support.

This commit is contained in:
houwenxiang
2019-11-26 20:01:50 +08:00
committed by kooho
parent 1dd2443758
commit f27ae9b0e2
44 changed files with 3281 additions and 976 deletions
@@ -593,14 +593,15 @@ static void spp_uart_init(void)
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_RTS,
.rx_flow_ctrl_thresh = 122,
.source_clk = UART_SCLK_APB,
};
//Install UART driver, and get the queue.
uart_driver_install(UART_NUM_0, 4096, 8192, 10, &spp_uart_queue, 0);
//Set UART parameters
uart_param_config(UART_NUM_0, &uart_config);
//Set UART pins
uart_set_pin(UART_NUM_0, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
//Install UART driver, and get the queue.
uart_driver_install(UART_NUM_0, 4096, 8192, 10, &spp_uart_queue, 0);
xTaskCreate(uart_task, "uTask", 2048, (void*)UART_NUM_0, 8, NULL);
}