change(newlib): Added unit tests for usleep and sleep_for functions

This commit adds unit tests to verify the basic functionality of
usleep() and this_thread::sleep_for() std functions.
This commit is contained in:
Sudeep Mohanty
2025-04-28 17:17:24 +02:00
parent 2793add0b2
commit f7c21372ca

View File

@ -159,7 +159,7 @@ static uint32_t pcnt_get_pulse_number(pcnt_unit_handle_t pwm_pcnt_unit, int capt
int count_value = 0;
TEST_ESP_OK(pcnt_unit_clear_count(pwm_pcnt_unit));
TEST_ESP_OK(pcnt_unit_start(pwm_pcnt_unit));
usleep(capture_window_ms * 1000);
vTaskDelay(pdMS_TO_TICKS(capture_window_ms));
TEST_ESP_OK(pcnt_unit_stop(pwm_pcnt_unit));
TEST_ESP_OK(pcnt_unit_get_count(pwm_pcnt_unit, &count_value));
printf("count value: %d\r\n", count_value);