diff options
author | puuu <puuu@users.noreply.github.com> | 2016-06-04 00:21:26 +0900 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-06-06 10:51:12 +0100 |
commit | ee12581a3545c6e950b4a2b5322167eb73326928 (patch) | |
tree | 609ae347a303629663d3c7196e2be3b2643bc72e /esp8266/modpybrtc.h | |
parent | eb78a5c530e21b5ce6bae8d7c28c1508275c7f68 (diff) | |
download | micropython-ee12581a3545c6e950b4a2b5322167eb73326928.tar.gz micropython-ee12581a3545c6e950b4a2b5322167eb73326928.zip |
esp8266: Let RTC work correctly after deepsleep.
By design, at wake up from deepsleep, the RTC timer will be reset, but
the data stored in RTC memory will not [1]. Therefore, we have to adjust
delta in RTC memory before going into deepsleep to get almost correct
time after waking up.
[1] http://bbs.espressif.com/viewtopic.php?t=1184#p4082
Diffstat (limited to 'esp8266/modpybrtc.h')
-rw-r--r-- | esp8266/modpybrtc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/esp8266/modpybrtc.h b/esp8266/modpybrtc.h index b4ca780712..5b9d9fc766 100644 --- a/esp8266/modpybrtc.h +++ b/esp8266/modpybrtc.h @@ -30,3 +30,5 @@ extern uint64_t pyb_rtc_alarm0_expiry; void pyb_rtc_set_us_since_2000(uint64_t nowus); uint64_t pyb_rtc_get_us_since_2000(); + +void rtc_prepare_deepsleep(uint64_t sleep_us); |