diff options
author | Daniel Campora <daniel@wipy.io> | 2015-05-17 16:09:27 +0200 |
---|---|---|
committer | Daniel Campora <daniel@wipy.io> | 2015-05-17 16:09:27 +0200 |
commit | 95a4f61499c9d6925fa545a80a8c306ae592da4c (patch) | |
tree | d20dae4082b12e4fb7a6a67372127a6add37627e | |
parent | c27dc38e8535400bd6e8b021e4932e4bb1b00b0b (diff) | |
download | micropython-95a4f61499c9d6925fa545a80a8c306ae592da4c.tar.gz micropython-95a4f61499c9d6925fa545a80a8c306ae592da4c.zip |
cc3200: Make sure RTC wake value is >= 1ms.
-rw-r--r-- | cc3200/mods/pybrtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cc3200/mods/pybrtc.c b/cc3200/mods/pybrtc.c index 603f9930c8..7a40deb857 100644 --- a/cc3200/mods/pybrtc.c +++ b/cc3200/mods/pybrtc.c @@ -192,7 +192,7 @@ STATIC mp_obj_t pyb_rtc_callback (mp_uint_t n_args, const mp_obj_t *pos_args, mp // check if any parameters were passed mp_obj_t _callback = mpcallback_find((mp_obj_t)&pyb_rtc_obj); if (kw_args->used > 0 || !_callback) { - uint32_t f_mseconds = args[3].u_int; + uint32_t f_mseconds = MAX(1, args[3].u_int); uint32_t seconds; uint16_t mseconds; // get the seconds and the milliseconds from the RTC |