Function esp_idf_svc::hal::sys::uart_enable_pattern_det_baud_intr
source · pub unsafe extern "C" fn uart_enable_pattern_det_baud_intr(
uart_num: u32,
pattern_chr: i8,
chr_num: u8,
chr_tout: i32,
post_idle: i32,
pre_idle: i32,
) -> i32
Expand description
@brief UART enable pattern detect function. Designed for applications like ‘AT commands’. When the hardware detect a series of one same character, the interrupt will be triggered.
@param uart_num UART port number. @param pattern_chr character of the pattern. @param chr_num number of the character, 8bit value. @param chr_tout timeout of the interval between each pattern characters, 16bit value, unit is the baud-rate cycle you configured. When the duration is more than this value, it will not take this data as at_cmd char. @param post_idle idle time after the last pattern character, 16bit value, unit is the baud-rate cycle you configured. When the duration is less than this value, it will not take the previous data as the last at_cmd char @param pre_idle idle time before the first pattern character, 16bit value, unit is the baud-rate cycle you configured. When the duration is less than this value, it will not take this data as the first at_cmd char.
@return - ESP_OK Success - ESP_FAIL Parameter error