35#ifndef _FREERTOS_DRIVERS_TI_MSPM0PIXELSTRIP_HXX_
36#define _FREERTOS_DRIVERS_TI_MSPM0PIXELSTRIP_HXX_
39#include <ti/devices/msp/msp.h>
40#include <ti/driverlib/driverlib.h>
51 SpiPixelStrip(SPI_Regs *spi,
unsigned num_pixels, uint8_t *backing_data)
68 uint16_t next_word = 0;
71 while (!
eof() && ofs < (1u << 13))
84 DL_SPI_transmitDataBlocking16(
spi_, next_word);
void update_sync()
Updates the hardware from the backing data.
unsigned currentByte_
Controls iteration over the data sequence when producing the output.
unsigned numPixels_
Number of pixels to drive.
uint8_t * data_
Backing framebuffer to use.
SpiPixelStrip(SPI_Regs *spi, unsigned num_pixels, uint8_t *backing_data)
Initializes the SPI peripheral.
SPI_Regs * spi_
SPI peripheral pointer.
uint8_t nextBit_
Controls iteration over the data sequence when producing the output.
void hw_init()
Opens and initializes the SPI hardware.
void clear_iteration()
Starts a new iteration over the strip.