FastLED
3.9.15
Loading...
Searching...
No Matches
clear.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
fl/leds.h
"
4
#include "
fl/stdint.h
"
5
6
7
namespace
fl
{
8
9
template
<
typename
T>
10
class
Grid
;
11
12
// Memory safe clear function for CRGB arrays.
13
template
<
int
N>
inline
void
clear
(
CRGB
(&arr)[N]) {
14
for
(
int
i = 0; i < N; ++i) {
15
arr[i] =
CRGB::Black
;
16
}
17
}
18
19
inline
void
clear
(
Leds
&
leds
) {
leds
.fill(
CRGB::Black
); }
20
21
template
<fl::size W, fl::size H>
22
inline
void
clear
(
LedsXY<W, H>
&
leds
) {
23
leds
.fill(
CRGB::Black
);
24
}
25
26
template
<
typename
T>
27
inline
void
clear
(
Grid<T>
&grid) {
28
grid.
clear
();
29
}
30
31
// Default, when you don't know what do then call clear.
32
template
<
typename
Container>
33
inline
void
clear
(Container &container) {
34
container.clear();
35
}
36
37
38
39
}
// namespace fl
leds
CRGB leds[NUM_LEDS]
Definition
AdafruitBridge.ino:13
fl::Grid::clear
void clear()
Definition
grid.h:30
fl::Grid
Definition
grid.h:11
fl::Leds
Definition
leds.h:11
fl::LedsXY
Definition
leds.h:58
leds.h
fl::clear
void clear(CRGB(&arr)[N])
Definition
clear.h:13
fl
IMPORTANT!
Definition
crgb.h:20
stdint.h
CRGB::Black
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition
crgb.h:567
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:86
fl
clear.h
Generated on Fri Aug 22 2025 20:59:33 for FastLED by
1.13.2