Remove include of stm32f4xx_hal.h, replace by include of MICROPY_HAL_H
where needed, and make it compile without float support. This makes
these 3 modules much more generic and usable by other ports.
os, time, select modules are now prefixed with u, but are still
available (via weak links) as their original names.
ure and ujson now available as re and json via weak links.
In CPython IOError (and EnvironmentError) is deprecated and aliased to
OSError. All modules that used to raise IOError now raise OSError (or a
derived exception).
In Micro Python we never used IOError (except 1 place, incorrectly) and
so don't need to keep it.
See http://legacy.python.org/dev/peps/pep-3151/ for background.
Teensy doesn't need to worry about overflows since all of
its timers are only 16-bit.
For PWM, the pulse width needs to be able to vary from 0..period+1
(pulse-width == period+1 corresponds to 100% PWM)
I couldn't test the 0xffffffff cases since we can't currently get a
period that big in python. With a prescaler of 0, that corresponds
to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
set that using freq or period.
I also tested both stmhal and teensy with floats disabled, which
required a few other code changes to compile.