FastLED
3.9.15
Loading...
Searching...
No Matches
squarewave.h
Go to the documentation of this file.
1
#pragma once
2
5
6
#include "
fl/stl/int.h
"
7
#include "
fl/math/lib8static.h
"
8
#include "
fl/stl/noexcept.h
"
9
10
namespace
fl
{
11
14
22
LIB8STATIC
u8
squarewave8
(
u8
in,
u8
pulsewidth = 128)
FL_NOEXCEPT
{
23
if
(in < pulsewidth || (pulsewidth == 255)) {
24
return
255;
25
}
else
{
26
return
0;
27
}
28
}
29
31
32
}
// namespace fl
lib8static.h
Defines static inlining macros for lib8tion functions.
fl::squarewave8
LIB8STATIC u8 squarewave8(u8 in, u8 pulsewidth=128) FL_NOEXCEPT
Square wave generator.
Definition
squarewave.h:22
LIB8STATIC
#define LIB8STATIC
Define a LIB8TION member function as static inline with an "unused" attribute.
Definition
lib8static.h:12
int.h
fl::u8
unsigned char u8
Definition
stdint.h:131
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
noexcept.h
FL_NOEXCEPT
#define FL_NOEXCEPT
fl
math
squarewave.h
Generated on Tue Jun 16 2026 00:06:59 for FastLED by
1.13.2