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
namespace
fl
{
7
// Memory safe clear function for CRGB arrays.
8
template
<
int
N>
inline
void
clear
(
CRGB
(&arr)[N]) {
9
for
(
int
i = 0; i < N; ++i) {
10
arr[i] =
CRGB::Black
;
11
}
12
}
13
14
inline
void
clear
(
Leds
&
leds
) {
leds
.fill(
CRGB::Black
); }
15
16
template
<
size_t
W,
size_t
H>
17
inline
void
clear
(
LedsXY<W, H>
&
leds
) {
18
leds
.fill(
CRGB::Black
);
19
}
20
21
}
// namespace fl
leds
CRGB leds[NUM_LEDS]
Definition
Apa102.ino:11
fl::Leds
Definition
leds.h:11
fl::LedsXY
Definition
leds.h:56
leds.h
fl::clear
void clear(CRGB(&arr)[N])
Definition
clear.h:8
fl
Implements a simple red square effect for 2D LED grids.
Definition
crgb.h:16
stdint.h
CRGB::Black
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition
crgb.h:504
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:55
fl
clear.h
Generated on Thu Jun 5 2025 04:29:38 for FastLED by
1.13.2