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
6namespace fl {
7// Memory safe clear function for CRGB arrays.
8template <int N> inline void clear(CRGB (&arr)[N]) {
9 for (int i = 0; i < N; ++i) {
10 arr[i] = CRGB::Black;
11 }
12}
13
14inline void clear(Leds &leds) { leds.fill(CRGB::Black); }
15} // namespace fl
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
void clear(CRGB(&arr)[N])
Definition clear.h:8
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:504
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55