|
@@ -463,8 +463,6 @@ esp_err_t uart_intr_config(uart_port_t uart_num, const uart_intr_config_t *intr_
|
|
|
* @brief Install UART driver.
|
|
* @brief Install UART driver.
|
|
|
*
|
|
*
|
|
|
* UART ISR handler will be attached to the same CPU core that this function is running on.
|
|
* UART ISR handler will be attached to the same CPU core that this function is running on.
|
|
|
- * Users should know that which CPU is running and then pick a INUM that is not used by system.
|
|
|
|
|
- * We can find the information of INUM and interrupt level in soc.h.
|
|
|
|
|
*
|
|
*
|
|
|
* @param uart_num UART_NUM_0, UART_NUM_1 or UART_NUM_2
|
|
* @param uart_num UART_NUM_0, UART_NUM_1 or UART_NUM_2
|
|
|
* @param rx_buffer_size UART RX ring buffer size
|
|
* @param rx_buffer_size UART RX ring buffer size
|
|
@@ -595,7 +593,6 @@ esp_err_t uart_flush(uart_port_t uart_num);
|
|
|
* @code{c}
|
|
* @code{c}
|
|
|
* //1. Setup UART
|
|
* //1. Setup UART
|
|
|
* #include "freertos/queue.h"
|
|
* #include "freertos/queue.h"
|
|
|
- * #define UART_INTR_NUM 17 //choose one interrupt number from soc.h
|
|
|
|
|
* //a. Set UART parameter
|
|
* //a. Set UART parameter
|
|
|
* int uart_num = 0; //uart port number
|
|
* int uart_num = 0; //uart port number
|
|
|
* uart_config_t uart_config = {
|
|
* uart_config_t uart_config = {
|
|
@@ -658,7 +655,7 @@ esp_err_t uart_flush(uart_port_t uart_num);
|
|
|
* //Set UART1 pins(TX: IO16, RX: IO17, RTS: IO18, CTS: IO19)
|
|
* //Set UART1 pins(TX: IO16, RX: IO17, RTS: IO18, CTS: IO19)
|
|
|
* uart_set_pin(uart_num, 16, 17, 18, 19);
|
|
* uart_set_pin(uart_num, 16, 17, 18, 19);
|
|
|
* //Install UART driver( We don't need an event queue here)
|
|
* //Install UART driver( We don't need an event queue here)
|
|
|
- * uart_driver_install(uart_num, 1024 * 2, 1024*4, 10, 17, NULL, RINGBUF_TYPE_BYTEBUF);
|
|
|
|
|
|
|
+ * uart_driver_install(uart_num, 1024 * 2, 1024*4, 10, NULL, 0);
|
|
|
* uint8_t data[1000];
|
|
* uint8_t data[1000];
|
|
|
* while(1) {
|
|
* while(1) {
|
|
|
* //Read data from UART
|
|
* //Read data from UART
|