Commit Graph

7 Commits

Author SHA1 Message Date
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler 5e38bb98cb rgbmatrix: update protomatter to 1.0.5 tag
this is compile-tested on
 stm32f405 feather
 matrixportal
 nrf52840 feather

but not actually tested-tested.
2020-10-10 14:30:37 -05:00
Jeff Epler dfa90cc11d allocator.h: add a missing license notice 2020-09-01 11:00:19 -05:00
Jeff Epler e01ade3848 rgbmatrix: Don't inline the allocator functions 2020-09-01 11:00:07 -05:00
Jeff Epler 2f120c70ee rgbmatrix: recover gracefully from allocation errors
e.g., allocating a 192x32x6bpp matrix would be enough to trigger this
reliably on a Metro M4 Express using the "memory hogging" layout.
Allocating 64x32x6bpp could trigger it, but somewhat unreliably.

There are several things going on here:
 * we make the failing call with interrupts off
 * we were throwing an exception with interrupts off
 * protomatter failed badly in _PM_free when it was partially-initialized

Incorporate the fix from protomatter, switch to a non-throwing malloc
variant, and ensure that interrupts get turned back on.

This decreases the quality of the MemoryError (it cannot report the size
of the failed allocation) but allows CircuitPython to survive, rather
than faulting.
2020-09-01 10:55:45 -05:00
Jeff Epler 5fcc6d6286 RGBMatrix: finish renaming from Protomatter
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.
2020-04-17 18:44:07 -05:00
Jeff Epler 3d6258f63d Rename Protomatter -> RGBMatrix
This is a quick rename, it changes the user-facing names but not the
internal names of things.
2020-04-17 18:43:57 -05:00