From cffab50ac32ca88bb30ec82b137609a9f43981fc Mon Sep 17 00:00:00 2001 From: Alex Lisitsyn Date: Thu, 29 Mar 2018 11:24:59 +0500 Subject: [PATCH] esp32: Deactivate wakeup trigger after first wakeup The files updated according to code review discussions. In the sleep_modes.c removed immidiate disable of ULP mode and leave just trigger deactivation. The esp_sleep.h is updated to have the same defines for source as esp_sleep_wakeup_cause_t. Updated documentation in sleep_modes.rst file to include cross references and address esp_sleep_wakeup_cause_t type. The get_time_ms() is updated to explicitly use fabs(dt) instead of abs(dt) in test_sleep.c. Some other minor changes in test_sleep.c unit test. (TW#18952) Closes https://github.com/espressif/esp-idf/issues/1677 --- components/esp32/test/test_sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp32/test/test_sleep.c b/components/esp32/test/test_sleep.c index 0cb5922264..fa1b902ac2 100644 --- a/components/esp32/test/test_sleep.c +++ b/components/esp32/test/test_sleep.c @@ -123,7 +123,7 @@ static float get_time_ms(void) float dt = (tv_stop.tv_sec - tv_start.tv_sec) * 1e3f + (tv_stop.tv_usec - tv_start.tv_usec) * 1e-3f; - return abs(dt); + return fabs(dt); } static uint32_t get_cause()