|
| | SpiPixelStrip (SPI_Regs *spi, unsigned num_pixels, uint8_t *backing_data) |
| | Initializes the SPI peripheral.
|
| |
|
void | hw_init () |
| | Opens and initializes the SPI hardware.
|
| |
| void | update_sync () |
| | Updates the hardware from the backing data.
|
| |
|
| SPI_Regs * | spi_ |
| | SPI peripheral pointer.
|
| |
| unsigned | numPixels_ |
| | Number of pixels to drive.
|
| |
| uint8_t * | data_ |
| | Backing framebuffer to use.
|
| |
| unsigned | currentByte_ |
| | Controls iteration over the data sequence when producing the output.
|
| |
| uint8_t | nextBit_ |
| | Controls iteration over the data sequence when producing the output.
|
| |
Definition at line 42 of file MSPM0SpiPixelStrip.hxx.
◆ SpiPixelStrip()
| SpiPixelStrip::SpiPixelStrip |
( |
SPI_Regs * |
spi, |
|
|
unsigned |
num_pixels, |
|
|
uint8_t * |
backing_data |
|
) |
| |
|
inline |
Initializes the SPI peripheral.
- Parameters
-
| spi | the SPI peripheral instance, e.g. SPI0. |
| num_pixels | the number of RGB pixels to drive. |
| backing_data | array of 3*num_pixels which stores the RGB data to be sent to the devices. Note that the byte order is G R B in the storage. |
Definition at line 51 of file MSPM0SpiPixelStrip.hxx.
◆ clear_iteration()
| void SpiPixelStrip::clear_iteration |
( |
| ) |
|
|
inlineprivate |
◆ eof()
| bool SpiPixelStrip::eof |
( |
| ) |
|
|
inlineprivate |
◆ next_bit()
| bool SpiPixelStrip::next_bit |
( |
| ) |
|
|
inlineprivate |
◆ update_sync()
| void SpiPixelStrip::update_sync |
( |
| ) |
|
|
inline |
Updates the hardware from the backing data.
The update is synchronous, this call returns when all bytes are sent, or at least enqueued in the SPI peripheral's TX FIFO.
Definition at line 63 of file MSPM0SpiPixelStrip.hxx.
◆ currentByte_
| unsigned SpiPixelStrip::currentByte_ |
|
private |
Controls iteration over the data sequence when producing the output.
This is the index of the current byte.
Definition at line 128 of file MSPM0SpiPixelStrip.hxx.
◆ data_
| uint8_t* SpiPixelStrip::data_ |
|
private |
◆ nextBit_
| uint8_t SpiPixelStrip::nextBit_ |
|
private |
Controls iteration over the data sequence when producing the output.
This is the mask of the next bit to use.
Definition at line 131 of file MSPM0SpiPixelStrip.hxx.
◆ numPixels_
| unsigned SpiPixelStrip::numPixels_ |
|
private |
◆ spi_
| SPI_Regs* SpiPixelStrip::spi_ |
|
private |
The documentation for this class was generated from the following file: