summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/esp_mphal.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-08 21:43:37 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-04 16:49:01 +0200
commita4c8ef9d16d45c58bbfc0aba451e4c197c552f0f (patch)
tree06ed7026e1718111efcdbe05807d5d3ba6393360 /esp8266/esp_mphal.h
parent57884996b9938141447c3440f8089516de90c0ec (diff)
downloadmicropython-a4c8ef9d16d45c58bbfc0aba451e4c197c552f0f.tar.gz
micropython-a4c8ef9d16d45c58bbfc0aba451e4c197c552f0f.zip
esp8266: Reset "virtual RTC" on power on.
Initialize RTC period coefficients, etc. if RTC RAM doesn't contain valid values. time.time() then will return number of seconds since power-on, unless set to different timebase. This reuses MEM_MAGIC for the purpose beyond its initial purpose (but the whole modpybrtc.c need to be eventually reworked completely anyway).
Diffstat (limited to 'esp8266/esp_mphal.h')
-rw-r--r--esp8266/esp_mphal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/esp8266/esp_mphal.h b/esp8266/esp_mphal.h
index 5c7b816355..f063fb8493 100644
--- a/esp8266/esp_mphal.h
+++ b/esp8266/esp_mphal.h
@@ -31,6 +31,7 @@
void ets_isr_mask(unsigned);
void mp_hal_init(void);
+void mp_hal_rtc_init(void);
void mp_hal_feed_watchdog(void);
uint32_t mp_hal_ticks_us(void);