Single-Board LED Control

LED control on a lighting board is provided by the Lighting Controller and WS2812 classes.

Main entry point

Because of the weirdness of DMA calls, we statically define two buffers. One of these we call the “dma output buffer”, the other one the “bank output buffer”. Since we use circular DMA, the dma output is twice the bank output. The bank output is simply the size of all of our LED’s + the desired padding. These are defined globally, so our dma callbacks have access to them. I’m not sure how else to do this .

Lighting Controller

The “Lighting Controller” is a supervisor/hypervisor style function that runs on every LED board. It is realized as class LightingController, and contains information such as the state of the LED board, references to the output buffer, and references to each individual LED. When the LED_Board hypervisor requests a change, the lighting controller is responsible for executing. How we do this is still TBD

WS2812

This class is fairly complete, the code is well commented and I’ll make a diagram soon