FastLED 3.9.7
Loading...
Searching...
No Matches
DATA_NOP Class Reference

Detailed Description

Dummy class for output controllers that need no data transformations.

Some of the SPI controllers will need to perform a transform on each byte before doing anything with it. Creating a class of this form and passing it in as a template parameter to writeBytes()/writeBytes3() will ensure that the body of this method will get called on every byte worked on.

Note
Recommendation: make the adjust method aggressively inlined.
Todo
Convinience macro for building these

Definition at line 37 of file fastspi_types.h.

#include <fastspi_types.h>

Static Public Member Functions

static FASTLED_FORCE_INLINE uint8_t adjust (FASTLED_REGISTER uint8_t data)
 Hook called to adjust a byte of data before writing it to the output.
 
static FASTLED_FORCE_INLINE uint8_t adjust (FASTLED_REGISTER uint8_t data, FASTLED_REGISTER uint8_t scale)
 Hook called to adjust a byte of data before writing it to the output.
 
static FASTLED_FORCE_INLINE void postBlock (int, void *context=NULL)
 Hook called after a block of data is written to the output.
 

Member Function Documentation

◆ adjust() [1/2]

static FASTLED_FORCE_INLINE uint8_t DATA_NOP::adjust ( FASTLED_REGISTER uint8_t data)
inlinestatic

Hook called to adjust a byte of data before writing it to the output.

In this dummy version, no adjustment is made.

Definition at line 41 of file fastspi_types.h.

◆ adjust() [2/2]

static FASTLED_FORCE_INLINE uint8_t DATA_NOP::adjust ( FASTLED_REGISTER uint8_t data,
FASTLED_REGISTER uint8_t scale )
inlinestatic

Hook called to adjust a byte of data before writing it to the output.

Parameters
datainput byte
scalescale value
Returns
input byte rescaled using scale8(uint8_t, uint8_t)

Definition at line 47 of file fastspi_types.h.

◆ postBlock()

static FASTLED_FORCE_INLINE void DATA_NOP::postBlock ( int ,
void * context = NULL )
inlinestatic

Hook called after a block of data is written to the output.

In this dummy version, no action is performed.

Definition at line 51 of file fastspi_types.h.


The documentation for this class was generated from the following file: