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
This commit is contained in:
Alex Lisitsyn 2018-03-29 11:24:59 +05:00
parent d91e2703f4
commit cffab50ac3

View file

@ -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()