FastLED 3.9.15
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);
25 DigitalPin &operator=(const DigitalPin &other) FL_NOEXCEPT;
26
28
29 void setPinMode(Mode mode);
30 bool high() const; // true if high, false if low
31 void write(bool is_high);
32 private:
33 DigitalPinImplPtr mImpl;
34};
35
36} // namespace fl
void write(bool is_high)
void setPinMode(Mode mode)
DigitalPinImplPtr mImpl
Definition digital_pin.h:33
bool high() const
~DigitalPin() FL_NOEXCEPT
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT
#define FASTLED_SHARED_PTR(type)
Definition shared_ptr.h:535