summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modpybrtc.c
diff options
context:
space:
mode:
authorJosef Gajdusek <atx@atx.name>2015-05-13 15:34:54 +0200
committerJosef Gajdusek <atx@atx.name>2015-05-13 17:59:36 +0200
commit40c6d578042254749b30ff1c56e7834503e49de9 (patch)
tree92f7d67313c2cf8d37eac685d0865d7728391dc9 /esp8266/modpybrtc.c
parenta09757f1049142f03a9d2c70e8b6e80480941706 (diff)
downloadmicropython-40c6d578042254749b30ff1c56e7834503e49de9.tar.gz
micropython-40c6d578042254749b30ff1c56e7834503e49de9.zip
esp8266: Actually use the decimal part of system_rtc_clock_cali_proc()
Diffstat (limited to 'esp8266/modpybrtc.c')
-rw-r--r--esp8266/modpybrtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/esp8266/modpybrtc.c b/esp8266/modpybrtc.c
index c0331760c6..7bf65e821c 100644
--- a/esp8266/modpybrtc.c
+++ b/esp8266/modpybrtc.c
@@ -47,7 +47,7 @@ typedef struct _pyb_rtc_obj_t {
#define MEM_USER_MAXLEN (512 - (MEM_USER_DATA_ADDR - MEM_DELTA_ADDR) * 4)
STATIC uint64_t pyb_rtc_raw_us(uint64_t cal) {
- return system_get_rtc_time() * ((cal >> 12) * 1000 + (cal & 0x0) / 4) / 1000;
+ return system_get_rtc_time() * ((cal >> 12) * 1000 + (cal & 0xfff) / 4) / 1000;
};
void pyb_rtc_set_us_since_2000(uint64_t nowus) {