| Age | Commit message (Collapse) | Author |
|
|
|
This code is shared by most parts, except where not all the #ifdefs
inside the tick function were present in all ports. This mostly would
have broken gamepad tick support on non-samd ports.
The "ms32" and "ms64" variants of the tick functions are introduced
because there is no 64-bit atomic read. Disabling interrupts avoids
a low probability bug where milliseconds could be off by ~49.5 days
once every ~49.5 days (2^32 ms).
Avoiding disabling interrupts when only the low 32 bits are needed is a minor
optimization.
Testing performed: on metro m4 express, USB still works and
time.monotonic_ns() still counts up
|
|
status indicator in use
|
|
|
|
|
|
|
|
We now track the last time the background task ran and bail on the
PulseIn if it starves the background work. In practice, this
happens after the numbers from pulsein are no longer accurate.
This also adjusts interrupt priorities so most are the lowest level
except for the tick and USB interrupts.
Fixes #516 and #876
|
|
Always use current_tick when sub millisecond precision is required.
Otherwise getting the ms/us to correspond is tricky.
|
|
|
|
common_hal_pulseio_pulsein_resume
|
|
us until_next_tick
|
|
for trigger_duration > 1000
|
|
argument to common_hal_delay_us
|
|
Also, fix and enable the status neopixel.
Fixes #264
|
|
This is prep for merging in the NRF5 pull request.
|