This started while adding USB MIDI support (and descriptor support is
in this change.) When seeing that I'd have to implement the MIDI class
logic twice, once for atmel-samd and once for nrf, I decided to refactor
the USB stack so its shared across ports. This has led to a number of
changes that remove items from the ports folder and move them into
supervisor.
Furthermore, we had external SPI flash support for nrf pending so I
factored out the connection between the usb stack and the flash API as
well. This PR also includes the QSPI support for nRF.
This was the last class from ubluepy and so that module is now gone.
The Device class offers both Peripheral and Central functionality.
See the inline docs for more info.
This commit cleans up the pin generation code, all the pins and their
AF (only ADC, for now) are specified in nrf52_af.csv and board use their
own csv file to specify which pins are available on that board and if
they have any special names.
These modules would be very handy to have in order to implement a
more robust replacement for ampy. It costs around 2KiB of text and
no data or bss.
'binascii' has base64 encoding, which can be used to create a fully
8-bit-clean transport above the slightly cooked serial connection of
these boards.
'hashlib' is a bit less critical, but I have found it handy to
be able to robustly checksum remote files.
I see this as only being useful on ports which don't have USB block
device support, so atmel-samd doesn't need it. These modules are
already on esp8266 so I think nrf52 seems like the only one that
needs it.
.. defaulting to off for circuitpython-supported boards, on for others.
.. fixing up the tests that fail when it is turned off, so that they skip
instead of failing
1. Turn off MICROPY_CPYTHON_COMPAT, which includes a number of minor CPython compatibility features,
most of which have workarounds, but uses up significant flash.
2. Turn on MICROPY_PY_SYS_MAXSIZE, which implements sys.maxsize.
3. Turn on MICROPY_CAN_OVERRIDE_BUILTINS, which implements "_" as the most recent value in the REPL,
and also enables redefining builtins.