FastLED 3.9.15
Loading...
Searching...
No Matches
fastspi_types.h
Go to the documentation of this file.
1#pragma once
2
5
6#ifndef __INC_FASTSPI_TYPES_H
7#define __INC_FASTSPI_TYPES_H
8
11#include "fl/stl/stdint.h"
12
15
16// Note: The two-parameter adjust(data, scale) method below requires fl::scale8,
17// but we cannot forward-declare it here due to linter rules (no 'namespace fl {}'
18// in src/ root files) and circular dependency issues (scale8.h includes crgb.h).
19// The method is currently unused in the codebase.
20
26
28#define SPI_B0 (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
30#define SPI_B1 (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
32#define SPI_B2 (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
34#define SPI_ADVANCE (3 + (MASK_SKIP_BITS & SKIP))
36
44class DATA_NOP {
45public:
49
50 // Two-parameter version commented out due to circular dependency issues
51 // (would need fl::scale8 which requires crgb.h, creating circular dependency).
52 // This method was never used in the codebase.
53 // static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data, FASTLED_REGISTER uint8_t scale) {
54 // return fl::scale8(data, scale);
55 // }
56
59 static FASTLED_FORCE_INLINE void postBlock(int /* len */, void* context = nullptr) {
60 FASTLED_UNUSED(context);
61 }
62};
63
65#define FLAG_START_BIT 0x80
66
69#define MASK_SKIP_BITS 0x3F
70
73
75#define SPEED_DIV_2 2
77#define SPEED_DIV_4 4
79#define SPEED_DIV_8 8
81#define SPEED_DIV_16 16
83#define SPEED_DIV_32 32
85#define SPEED_DIV_64 64
87#define SPEED_DIV_128 128
89
92#define MAX_DATA_RATE 0
93
94#endif
95
static FASTLED_FORCE_INLINE fl::u8 adjust(FASTLED_REGISTER fl::u8 data)
Hook called to adjust a byte of data before writing it to the output.
static FASTLED_FORCE_INLINE void postBlock(int, void *context=nullptr)
Hook called after a block of data is written to the output.
Dummy class for output controllers that need no data transformations.
unsigned char u8
Definition stdint.h:131
#define FASTLED_REGISTER
#define FASTLED_FORCE_INLINE
#define FL_DISABLE_WARNING_PUSH
#define FL_DISABLE_WARNING_POP
#define FASTLED_UNUSED(x)
#define FL_DISABLE_WARNING_DEPRECATED_REGISTER