SPIM3 is faster than all other SPI blocks, and is capable of generating
a 32 MHz clock. However, it cannot be used at the same time as the BLE
radio without dedicating an additional 8 kB of RAM to it.
Therefore, some boards may want to disable this. Support pre-defining
NRFX_SPIM3_ENABLED on the command line to disable it on some bords.
Signed-off-by: Sean Cross <sean@xobs.io>
Ujson should only worry about whitespace before JSON. This becomes apparent when you are using MP stream protocol to read directly from input buffers.
When you attempt to read(1) on a UART (and possibly other protocols) you have to wait for either the byte or the timeout.
Fixes:
- Waiting for a timeout after you have completed reading a correct and complete JSON off the input.
- Raising an OSError after reading a correct and complete JSON off the input.
- Eating more data than semantically owned off the input buffer.
- Blocking to start parsing JSON until the entire JSON body has been loaded into a potentially large, contiguous Python object.
Code you would write before:
```
line = board_busio_uart_port.read_line()
json_dict = json.loads(line)
```
or reaching for fixed buffers and swapping them around in Python.
Code that did not work before that does now:
```
json_dict = json.load(board_busio_uart_port)
```
- This removes the need for intermediate copies of data when reading JSON from micropython stream protocol inputs.
- It also increases total application speed by parsing JSON concurrently with receiving on boards that read from UART via DMA.
- It simplifies code that users write while improving their apps.
vectorio builds on m4 express feather
Concrete shapes are composed into a VectorShape which is put into a displayio Group for display.
VectorShape provides transpose and x/y positioning for shape implementations.
Included Shapes:
* Circle
- A radius; Circle is positioned at its axis in the VectorShape.
- You can freely modify the radius to grow and shrink the circle in-place.
* Polygon
- An ordered list of points.
- Beteween each successive point an edge is inferred. A final edge closing the shape is inferred between the last
point and the first point.
- You can modify the points in a Polygon. The points' coordinate system is relative to (0, 0) so if you'd like a
top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (0, 20)] and your VectorShape
x and y properties will position the rectangle relative to its top center point
* Rectangle
A width and a height.
Simmel had USB HID disabled in order to save space. However, the board
configuration did not set USB_DEVICES, causing it to inherit the default
device bouquet of MSC,CDC,MIDI,HID. This in turn caused HID to be included
in the USB Configuration Descriptor.
For some reason, this was not a problem in an earlier version of tinyusb or
circuitpython. However, in the most recent version this has rightfully
caused asserts to appear during configuration.
Re-enable USB_HID for now, as it doesn't add too much in terms of space.
We may disable it again later on if we become pressed for space.
Signed-off-by: Sean Cross <sean@xobs.io>
This was not added as part of the initial v7.0.1 patchset because
.hex files are in this project's .gitignore, and so git ignored it.
Signed-off-by: Sean Cross <sean@xobs.io>
this non-"express" board is nearly full. Right now it's actually possible
just to disable the "compare" module, but as this leaves it packed
pretty full I prefer to fully disable it in order to avoid the topic
returning again soon.
Previously, we were using v6.1.1 which worked, but was unsupported.
v7.0.1 is the first version of s140 that supports the nRF52833.
Signed-off-by: Sean Cross <sean@xobs.io>
Allow for setting various softradio memory settings as part of a
board in order to support lower-memory configurations. If a
parameter is unspecified then the previously-defined value is used.
Signed-off-by: Sean Cross <sean@xobs.io>
Conditionally set variables such as the softdevice RAM size, bootloader
size, and the spi m3 buffer size. This allows ports to adjust these
values to suit their needs.
Signed-off-by: Sean Cross <sean@xobs.io>
The BLE Config area needs to be subtracted from the size of the firmware.
THis is because the firmware is counted by walking backwards from the end
of memory, and the BLE config area is placed lower in memory than the
firmware. Subtracting the BLE config size ensures the internal flash
filesystem doesn't try to use the firmware as storage.
Signed-off-by: Sean Cross <sean@xobs.io>
This adds preliminary support for the nRF52833, which is a variant of
the nRF52840 with half the RAM, half the flash, and fewer peripherals.
Signed-off-by: Sean Cross <sean@xobs.io>
Ports can set CIRCUITPY_RGBMATRIX and CIRCUITPY_FRAMEBUFFERIO to 0
in their .mk file in order to prevent these from being built. This
is necessary for resource-constrained devices.
Signed-off-by: Sean Cross <sean@xobs.io>
This gets all the purely internal references. Some uses of
protomatter/Protomatter/PROTOMATTER remain, as they are references
to symbols in the Protomatter C library itself.
I originally believed that there would be a wrapper library around it,
like with _pixelbuf; but this proves not to be the case, as there's
too little for the library to do.
Manually specify available modules and disable any modules
that are currently unsupported on the litex target.
Signed-off-by: Sean Cross <sean@xobs.io>
The iMX RT has a separate wake up controller, the GPC, that replaces
the NVIC when asleep. It adds the ability to only wake up on certain
interrupts. It seems that it requires at least one enabled interrupt
in the NVIC to turn on it's wake up circuitry. It doesn't need to
be the same interrupt as the wake up signal. For example, the RTC
in the SNVS can wake us up if a USB interrupt is enabled. Before
then it won't work. So, we enable the SNVS interrupt on start up
so it can wake us up.
The SPI flash on current Fomu firmware is slow. Circuitpython runs
XIP from SPI flash, and so execution time can also be slow. Ordinarily
this isn't a problem, however certain operations are time-sensitive.
In particular, USB function needs to be handled quickly in order to
prevent the host from re-enumerating the device.
Place several critical TinyUSB structures into RAM, as well as several
hot functions that are frequently called. This reduces execution time
at the expense of system memory, and greatly improves system stability.
Signed-off-by: Sean Cross <sean@xobs.io>
ports/atmel-samd/boards/bdmicro_vina_m0/board.c
ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.h
ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.mk
ports/atmel-samd/boards/bdmicro_vina_m0/board.c
This board includes the newly added MX25L51245G 64MB SPI flash chip
for the CircuitPython file system. Also included is the PCF2129T/2,518
high accuracy, battery backed, RTC. Also includes an independent USB
HOST connector in addition to USB DEVICE making it easy to connect USB
peripherals. Designed mainly as a general purpose module to piggy back
onto application-specific boards, it can also run low power standalone
in harsh environments for data logging and other control applications
using an appropriate enclosure.
Has been extensively tested with CircuitPython and works well.
Restructures the STM port of Circuitpython to be more generic about the STM32 chip lines to support
the F7 and H7 series of chips. Adds the new Packages directory to organize different chip layouts
between lines. Makes general changes to the Makefile to condense board-level flags to the minimum
and support the new chip series. Adds the new chip line to the Peripherals directory, along with
new python tools used to generate peripheral text automatically in the tools/ directory.