This new function controls what happens on a hard-fault:
- debugging disabled: board will do a reset
- debugging enabled: board will print registers and stack and flash LEDs
The default is disabled, ie to do a reset. This is different to previous
behaviour which flashed the LEDs and waited indefinitely.
The port now uses the common mp_utime_ticks_{ms,us,cpu,add,diff} functions
from extmod/utime_mphal.c.
The mp_utime_sleep_XXX functions are still cc3200-specific because they
handle the GIL differently to the ones in extmod.
The files misc/mpsystick.[ch] have been removed because they contain 2
unused functions, and the other remaining function is renamed to
mp_hal_ticks_us and moved to hal/cc3200_hal.c.
machine.time_pulse_us() is intended to provide very fine timing, including
while working with signal bursts, where each transition is tracked in row.
Throwing and handling an exception may take too much time and "signal loss".
So instead, in case of a timeout, just return negative value. Cases of
timeout while waiting for initial signal stabilization, and during actual
timing, are recognized.
The documentation is updated accordingly, and rewritten somewhat to clarify
the function behavior.
This patch fixes two main things:
- dicts can be printed directly using '%s' % dict
- %-formatting should not crash when passed a non-dict to, eg, '%(foo)s'
Updated modbuiltin.c to add conditional support for 3-arg calls to
pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in
objint_mpz.c for for optimised implementation.
This patch brings the _thread module to stmhal/pyboard. There is a very
simple round-robin thread scheduler, which is disabled if there is only
one thread (for efficiency when threading is not used).
The scheduler currently switches threads at a rate of 250Hz using the
systick timer and the pend-SV interrupt.
The GIL is disabled so one must be careful to use lock objects to prevent
concurrent access of objects.
The threading is disabled by default, one can enabled it with the config
option MICROPY_PY_THREAD to test it out.
The first partition is mounted as "/sd" and subsequent partitions are
mounted as "/sd<part_num>". This is backwards compatible with the previous
behaviour, which just mounted the first partition on "/sd".
At this point, only FatFs filesystems are mounted.