FastLED 3.10.8
Loading...
Searching...
No Matches
digital_pin.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/shared_ptr.h" // For FASTLED_SHARED_PTR macros
4#include "fl/stl/noexcept.h"
5
6namespace fl {
7
9
10// A simple digital pin that provides a unified interface across all platforms
11// using fl/pin.h. Supports digital I/O, pullup/pulldown resistors.
12// Note: Analog mode is not supported by this class (use fl::analogRead directly).
14 public:
21
22 DigitalPin(int pin) FL_NO_EXCEPT;
25 DigitalPin &operator=(const DigitalPin &other) FL_NO_EXCEPT;
26
28
29 void setPinMode(Mode mode) FL_NO_EXCEPT;
30 bool high() const FL_NO_EXCEPT; // true if high, false if low
31 void write(bool is_high) FL_NO_EXCEPT;
32 private:
33 DigitalPinImplPtr mImpl;
34};
35
36} // namespace fl
DigitalPin(int pin) FL_NO_EXCEPT
bool high() const FL_NO_EXCEPT
~DigitalPin() FL_NO_EXCEPT
DigitalPinImplPtr mImpl
Definition digital_pin.h:33
void write(bool is_high) FL_NO_EXCEPT
void setPinMode(Mode mode) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
Definition shared_ptr.h:577