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"
8#include "fl/stl/noexcept.h"
9
10namespace fl {
11
14
22LIB8STATIC 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
Defines static inlining macros for lib8tion functions.
LIB8STATIC u8 squarewave8(u8 in, u8 pulsewidth=128) FL_NOEXCEPT
Square wave generator.
Definition squarewave.h:22
#define LIB8STATIC
Define a LIB8TION member function as static inline with an "unused" attribute.
Definition lib8static.h:12
unsigned char u8
Definition stdint.h:131
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT