FastLED  3.1
fastspi_types.h
1 #ifndef __INC_FASTSPI_TYPES_H
2 #define __INC_FASTSPI_TYPES_H
3 
4 #include "FastLED.h"
5 
6 FASTLED_NAMESPACE_BEGIN
7 
8 // Some helper macros for getting at mis-ordered byte values
9 #define SPI_B0 (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
10 #define SPI_B1 (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
11 #define SPI_B2 (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
12 #define SPI_ADVANCE (3 + (MASK_SKIP_BITS & SKIP))
13 
20 class DATA_NOP {
21 public:
22  static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data) { return data; }
23  static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data, register uint8_t scale) { return scale8(data, scale); }
24  static __attribute__((always_inline)) inline void postBlock(int /* len */) { }
25 };
26 
27 #define FLAG_START_BIT 0x80
28 #define MASK_SKIP_BITS 0x3F
29 
30 // Clock speed dividers
31 #define SPEED_DIV_2 2
32 #define SPEED_DIV_4 4
33 #define SPEED_DIV_8 8
34 #define SPEED_DIV_16 16
35 #define SPEED_DIV_32 32
36 #define SPEED_DIV_64 64
37 #define SPEED_DIV_128 128
38 
39 #define MAX_DATA_RATE 0
40 
41 FASTLED_NAMESPACE_END
42 
43 #endif
Some of the SPI controllers will need to perform a transform on each byte before doing anyting with i...
Definition: fastspi_types.h:20
central include file for FastLED, defines the CFastLED class/object
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
Definition: scale8.h:20