FastLED 3.9.7
Loading...
Searching...
No Matches
fastspi_types.h
Go to the documentation of this file.
1
3
4#ifndef __INC_FASTSPI_TYPES_H
5#define __INC_FASTSPI_TYPES_H
6
7#include "FastLED.h"
8#include "fl/force_inline.h"
9#include "fl/namespace.h"
10#include "fl/unused.h"
11
13
19
21#define SPI_B0 (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
23#define SPI_B1 (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
25#define SPI_B2 (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
27#define SPI_ADVANCE (3 + (MASK_SKIP_BITS & SKIP))
29
37class DATA_NOP {
38public:
41 static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data) { return data; }
42
47 static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data, FASTLED_REGISTER uint8_t scale) { return scale8(data, scale); }
48
51 static FASTLED_FORCE_INLINE void postBlock(int /* len */, void* context = NULL) {
52 FASTLED_UNUSED(context);
53 }
54};
55
57#define FLAG_START_BIT 0x80
58
61#define MASK_SKIP_BITS 0x3F
62
65
67#define SPEED_DIV_2 2
69#define SPEED_DIV_4 4
71#define SPEED_DIV_8 8
73#define SPEED_DIV_16 16
75#define SPEED_DIV_32 32
77#define SPEED_DIV_64 64
79#define SPEED_DIV_128 128
81
84#define MAX_DATA_RATE 0
85
87
88#endif
central include file for FastLED, defines the CFastLED class/object
Dummy class for output controllers that need no data transformations.
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.
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:34
Implements the FastLED namespace macros.
#define FASTLED_NAMESPACE_END
End of the FastLED namespace.
Definition namespace.h:16
#define FASTLED_NAMESPACE_BEGIN
Start of the FastLED namespace.
Definition namespace.h:14