mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(uart): add glitch filter functionality for UART
Closes https://github.com/espressif/esp-idf/issues/17847
This commit is contained in:
@@ -50,10 +50,9 @@ TEST_CASE("ledc etm event and task", "[ledc]")
|
||||
TEST_ESP_OK(esp_etm_channel_enable(etm_channel_a));
|
||||
|
||||
// use UART auto baud rate detection feature to count the PWM pulse count
|
||||
uart_bitrate_detect_config_t conf = {
|
||||
.rx_io_num = PULSE_IO,
|
||||
.source_clk = UART_SCLK_DEFAULT,
|
||||
};
|
||||
uart_bitrate_detect_config_t conf = {};
|
||||
conf.rx_io_num = PULSE_IO;
|
||||
conf.source_clk = UART_SCLK_DEFAULT;
|
||||
uart_bitrate_res_t res = {};
|
||||
|
||||
uart_detect_bitrate_start(UART_NUM_1, &conf);
|
||||
|
||||
@@ -37,10 +37,9 @@ ledc_timer_config_t create_default_timer_config(void)
|
||||
// use UART auto baud rate detection feature to test the waveform of LEDC
|
||||
int wave_count(int last_time)
|
||||
{
|
||||
uart_bitrate_detect_config_t conf = {
|
||||
.rx_io_num = PULSE_IO,
|
||||
.source_clk = UART_SCLK_DEFAULT,
|
||||
};
|
||||
uart_bitrate_detect_config_t conf = {};
|
||||
conf.rx_io_num = PULSE_IO;
|
||||
conf.source_clk = UART_SCLK_DEFAULT;
|
||||
uart_bitrate_res_t res = {};
|
||||
uart_detect_bitrate_start(UART_NUM_1, &conf);
|
||||
vTaskDelay(pdMS_TO_TICKS(last_time));
|
||||
|
||||
Reference in New Issue
Block a user