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
9#include "fl/force_inline.h"
10#include "fl/namespace.h"
11#include "fl/unused.h"
12
14
20
22#define SPI_B0 (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
24#define SPI_B1 (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
26#define SPI_B2 (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
28#define SPI_ADVANCE (3 + (MASK_SKIP_BITS & SKIP))
30
38class DATA_NOP {
39public:
42 static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data) { return data; }
43
48 static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data, FASTLED_REGISTER uint8_t scale) { return scale8(data, scale); }
49
52 static FASTLED_FORCE_INLINE void postBlock(int /* len */, void* context = NULL) {
53 FASTLED_UNUSED(context);
54 }
55};
56
58#define FLAG_START_BIT 0x80
59
62#define MASK_SKIP_BITS 0x3F
63
66
68#define SPEED_DIV_2 2
70#define SPEED_DIV_4 4
72#define SPEED_DIV_8 8
74#define SPEED_DIV_16 16
76#define SPEED_DIV_32 32
78#define SPEED_DIV_64 64
80#define SPEED_DIV_128 128
82
85#define MAX_DATA_RATE 0
86
88
89#endif
UISlider scale("Scale", 1.0f, 0.0f, 1.0f, 0.01f)
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.
Dummy class for output controllers that need no data transformations.
#define FASTLED_FORCE_INLINE
Definition force_inline.h:6
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:40
#define FASTLED_NAMESPACE_END
Definition namespace.h:23
Implements the FastLED namespace macros.
#define FASTLED_REGISTER
Helper macro to replace the deprecated 'register' keyword if we're using modern C++ where it's been r...
Definition register.h:8
#define FASTLED_UNUSED(x)
Definition unused.h:3