FastLED 3.10.8
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#include "fl/stl/noexcept.h"
13
16
17// Note: The two-parameter adjust(data, scale) method below requires fl::scale8,
18// but we cannot forward-declare it here due to linter rules (no 'namespace fl {}'
19// in src/ root files) and circular dependency issues (scale8.h includes crgb.h).
20// The method is currently unused in the codebase.
21
27
29#define SPI_B0 (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
31#define SPI_B1 (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
33#define SPI_B2 (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
35#define SPI_ADVANCE (3 + (MASK_SKIP_BITS & SKIP))
37
45class DATA_NOP {
46public:
50
51 // Two-parameter version commented out due to circular dependency issues
52 // (would need fl::scale8 which requires crgb.h, creating circular dependency).
53 // This method was never used in the codebase.
54 // static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data, FASTLED_REGISTER uint8_t scale) {
55 // return fl::scale8(data, scale);
56 // }
57
60 static FASTLED_FORCE_INLINE void postBlock(int /* len */, void* context = nullptr) FL_NO_EXCEPT {
61 FASTLED_UNUSED(context);
62 }
63};
64
66#define FLAG_START_BIT 0x80
67
70#define MASK_SKIP_BITS 0x3F
71
74
76#define SPEED_DIV_2 2
78#define SPEED_DIV_4 4
80#define SPEED_DIV_8 8
82#define SPEED_DIV_16 16
84#define SPEED_DIV_32 32
86#define SPEED_DIV_64 64
88#define SPEED_DIV_128 128
90
93#define MAX_DATA_RATE 0
94
95#endif
96
static FASTLED_FORCE_INLINE fl::u8 adjust(FASTLED_REGISTER fl::u8 data) FL_NO_EXCEPT
Hook called to adjust a byte of data before writing it to the output.
static FASTLED_FORCE_INLINE void postBlock(int, void *context=nullptr) FL_NO_EXCEPT
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
#define FL_NO_EXCEPT