circuitpython/shared
robert-hh de1f1dd164 shared/runtime/softtimer: Use consistently the same clock source.
Before, both uwTick and mp_hal_ticks_ms() were used as clock source.  That
assumes, that these two are synchronous and start with the same value,
which may be not the case for all ports.  If the lag between uwTick and
mp_hal_ticks_ms() is larger than the timer interval, the timer would either
rush up until the times are synchronous, or not start until uwTick wraps
over.

As suggested by @dpgeorge, MICROPY_SOFT_TIMER_TICKS_MS is now used in
softtimer.c, which has to be defined in a port's mpconfigport.h with
the variable that holds the SysTick counter.

Note that it's not possible to switch everything in softtimer.c to use
mp_hal_ticks_ms() because the logic in SysTick_Handler that schedules
soft_timer_handler() uses (eg on mimxrt) the uwTick variable directly
(named systick_ms there), and mp_hal_ticks_ms() uses a different source
timer.  Thus it is made fully configurable.
2023-02-16 12:59:48 +11:00
..
libc shared/libc/string0: Don't include string.h, and provide __memcpy_chk. 2021-11-17 13:58:07 +11:00
memzip all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
netutils shared/netutils: Add "py/obj.h" header include. 2022-11-11 15:43:53 +11:00
readline shared/readline: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:48:49 +10:00
runtime shared/runtime/softtimer: Use consistently the same clock source. 2023-02-16 12:59:48 +11:00
timeutils mimxrt/machine_rtc: Start RTC at boot and set datetime if not set. 2022-04-11 12:25:23 +10:00
tinyusb shared/tinyusb: Fix CDC bNumInterfaces value. 2022-11-14 13:03:33 +11:00
upytesthelper ports: Add '.frozen' as the first entry in sys.path. 2021-12-18 00:08:07 +11:00
README.md lib,shared: Update README's based on contents of these dirs. 2021-07-13 00:17:02 +10:00

This directory contains libraries, utilities and helper code developed specifically for this project. The code is intended to be portable and usable by any port.