Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
Instead of pyb.switch() as a function, it's more consistent (with
respect to all the other modules and peripherals) to have
pyb.Switch() create a switch object. This then generalises to having
multiple switches. Call the object to get its state. Use sw.callback
to set the callback function for when the switch is pressed.
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID.
Choice is made by an option in boot.py, with default being CDC+MSC.
HID+MSC is not currently supported, but should be easy to implement.
Boot up now has ability to change the reset mode: hold down USR switch
while booting and LEDs will count from 1 to 7 to indicate the boot mode.
Release USR when correct mode is selected. Current modes are 1 (normal
boot), 2 (safe mode), 3 (reset FS mode).