Skip to content

Commit 95a4f61

Browse files
author
Daniel Campora
committed
cc3200: Make sure RTC wake value is >= 1ms.
1 parent c27dc38 commit 95a4f61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cc3200/mods/pybrtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ STATIC mp_obj_t pyb_rtc_callback (mp_uint_t n_args, const mp_obj_t *pos_args, mp
192192
// check if any parameters were passed
193193
mp_obj_t _callback = mpcallback_find((mp_obj_t)&pyb_rtc_obj);
194194
if (kw_args->used > 0 || !_callback) {
195-
uint32_t f_mseconds = args[3].u_int;
195+
uint32_t f_mseconds = MAX(1, args[3].u_int);
196196
uint32_t seconds;
197197
uint16_t mseconds;
198198
// get the seconds and the milliseconds from the RTC

0 commit comments

Comments
 (0)