ESP-IDF 串口检测事件的疑问

hequan
Posts: 18
Joined: Thu Jul 15, 2021 3:37 pm

ESP-IDF 串口检测事件的疑问

Postby hequan » Fri Jul 30, 2021 8:26 am

跑官方demo uart_events遇到疑惑

Code: Select all

uart_enable_pattern_det_baud_intr(EX_UART_NUM, '+', PATTERN_CHR_NUM, 9, 0, 0);
这个函数设置接收缓冲区遇到‘+’触发事件,但是在实际中似乎事件类型没有出现过UART_PATTERN_DET。
116IJ~[LNF_60SYEQX{}RTB.png
116IJ~[LNF_60SYEQX{}RTB.png (226.07 KiB) Viewed 3207 times
Q}HHNPI1}MGNMF[J4GOF8)X.png
Q}HHNPI1}MGNMF[J4GOF8)X.png (231.24 KiB) Viewed 3207 times

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP-IDF 串口检测事件的疑问

Postby ESP_Gargamel » Fri Jul 30, 2021 9:38 am

PATTERN_CHR_NUM 默认是 3,所以需要 3 个 +。

Who is online

Users browsing this forum: No registered users and 160 guests