feat(uart): update uart driver for esp32s2beta

This commit is contained in:
chenjianqiang
2019-06-14 11:01:30 +08:00
parent 413a98b151
commit 4cc962353c
12 changed files with 367 additions and 222 deletions
@@ -140,7 +140,11 @@ void app_main()
uart_driver_install(EX_UART_NUM, BUF_SIZE * 2, BUF_SIZE * 2, 20, &uart0_queue, 0);
//Set uart pattern detect function.
#if CONFIG_IDF_TARGET_ESP32
uart_enable_pattern_det_intr(EX_UART_NUM, '+', PATTERN_CHR_NUM, 10000, 10, 10);
#elif CONFIG_IDF_TARGET_ESP32S2BETA
uart_enable_pattern_det_intr(EX_UART_NUM, '+', PATTERN_CHR_NUM, 9, 0, 0);
#endif
//Reset the pattern queue length to record at most 20 pattern positions.
uart_pattern_queue_reset(EX_UART_NUM, 20);