mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-04 11:55:21 +02:00
feat(uart): update uart driver for esp32s2beta
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user