summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modpybrtc.h
Commit message (Collapse)AuthorAge
* esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky2016-11-06
| | | | | | | Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
* esp8266: Let RTC work correctly after deepsleep.puuu2016-06-06
| | | | | | | | | 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
* esp8266: Implement basic deep-sleep capabilities.Damien George2016-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the machine.deepsleep() function to enter the sleep mode. Use the RTC to configure the alarm to wake the device. Basic use is the following: import machine # configure RTC's ALARM0 to wake device from deep sleep rtc = machine.RTC() rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP) # do other things # ... # set ALARM0's alarm to wake after 10 seconds rtc.alarm(rtc.ALARM0, 10000) # enter deep-sleep state (system is reset upon waking) machine.deepsleep() To detect if the system woke from a deep sleep use: if machine.reset_cause() == machine.DEEPSLEEP_RESET: print('woke from deep sleep')
* esp8266: Add utime and pyb.RTCJosef Gajdusek2015-05-13