FastLED
3.9.7
Loading...
Searching...
No Matches
digital_pin.h
1
#pragma once
2
3
4
#include <stdint.h>
5
6
#include "fl/ui.h"
7
#include "fl/ptr.h"
8
9
#include "
fl/namespace.h
"
10
11
namespace
fl
{
12
13
FASTLED_SMART_PTR(DigitalPinImpl);
14
15
16
// A simple digital pin. If we are compiling in an Arduino environment, then
17
// this class will bind to that. Otherwise it will fall back to the platform api.
18
// Note that this class does not support analog mode nor pullups/pulldowns.
19
class
DigitalPin
{
20
public
:
21
enum
Mode {
22
kInput = 0,
23
kOutput,
24
// the fallback mechanism does not support pullups or pulldowns, so we don't either yet.
25
// TODO: Add these for the fallback mechanism.
26
// kInputPullup,
27
// kInputPulldown,
28
};
29
30
DigitalPin
(
int
pin);
31
~DigitalPin
();
32
DigitalPin
(
const
DigitalPin
&other);
33
DigitalPin
&operator=(
const
DigitalPin
&other);
34
35
DigitalPin
(
DigitalPin
&&other) =
delete
;
36
37
void
setPinMode(Mode mode);
38
bool
high()
const
;
// true if high, false if low
39
void
write(
bool
is_high);
40
private
:
41
DigitalPinImplPtr mImpl;
42
};
43
44
}
// namespace fl
fl::DigitalPin
Definition
digital_pin.h:19
namespace.h
Implements the FastLED namespace macros.
fl
Implements a simple red square effect for 2D LED grids.
Definition
crgb.h:16
src
sensors
digital_pin.h
Generated on Fri Dec 20 2024 20:54:48 for FastLED by
1.11.0