* atmel-samd: Remove ASF3. This will break builds.
* atmel-samd: Add ASF4 for the SAMD21 and SAMD51.
* Introduce the supervisor concept to facilitate porting.
The supervisor is the code which runs individual MicroPython VMs. By
splitting it out we make it more consistent and easier to find.
This also adds very basic SAMD21 and SAMD51 support using the
supervisor. Only the REPL currently works.
This begins the work for #178.
* atmel-samd: Introduce a nvm module for non-volatile byte-level memory access.
This allows for persisting small configuration values even when the file system
is read-only from CircuitPython.
Fixes#160
* Review feedback:
* Add tests.
* Fix non-zero index.
* Fix len()
* Track status pin use by user code separately so it can take over the pins and then give them back.
* Switch to hardware SPI for APA102 on Gemma and Trinket.
* Merge microcontroller/types.h into microcontroller/Pin.h to better match approach going forwards.
You can either set it once up front, or set variable_frequency on custruction to
indicate that the frequency must be able to change. This informs whether a timer
can be shared amongst pins.
This also adds persistent clock calibration on atmel-samd. Once the device has
synced its clock frequency over USB it will remember that config value until USB
is used again. This helps ensure the clock frequency is similar on and off USB.
Lastly, this also corrects time.sleep() when on USB by correcting the tick counter.
The new sequence is as follows:
* Solid blue during the boot/settings script.
* Solid green during the main/code script.
* After main while waiting to enter repl or reset:
* Fading green once main is done successfully.
* On error produce a series of flashes:
* Long flash color of script.
* Long flash color of error:
* Green = IndentationError
* Cyan = SyntaxError
* White = NameError
* Orange = OSError
* Yellow = Other error
* Line number of the exception by digit. Number of flashes represents value.
* Thousands = White
* Hundreds = Blue
* Tens = Yellow
* Ones = Cyan
* Off for a period and then repeats.
At any point a write to the flash storage will flicker red.
Fixes#63
This prevents corrupting previous functional objects by stealing their pins
out from under them. It prevents this by ensuring that pins are in default
state before claiming them. It also verifies pins are released correctly and
reset on soft reset.
Fixes#4, instantiating a second class will fail.
Fixes#29, pins are now reset too.