SegLCDLib
Loading...
Searching...
No Matches
SegBacklightArduino.h
Go to the documentation of this file.
1#ifndef SEGBACKLIGHTARDUINO_H
2#define SEGBACKLIGHTARDUINO_H
3
4#ifndef SEGLCD_DISABLE_ARDUINO_TRANSPORT
5
6#include <Arduino.h>
7
8#include "SegBacklight.h"
9
14 public:
21 SegBacklightArduino(uint8_t pin, bool activeHigh = true);
22
23 void init(bool pwm) override;
24 void setDigital(bool state) override;
25 void setBrightness(uint8_t brightness) override;
26
27 private:
28 uint8_t _pin;
30
34 #if defined(ESP32) && ESP_IDF_VERSION_MAJOR < 5
35 uint8_t _channel = 0;
36 #endif
37};
38
39#endif
40
41#endif
Arduino GPIO/PWM implementation of backlight control.
Definition SegBacklightArduino.h:13
uint8_t _pin
Definition SegBacklightArduino.h:28
bool _activeHigh
Definition SegBacklightArduino.h:29
void init(bool pwm) override
Initialize the backlight output.
Definition SegBacklightArduino.cpp:8
void setDigital(bool state) override
Drive the backlight on/off.
Definition SegBacklightArduino.cpp:28
void setBrightness(uint8_t brightness) override
Drive the backlight brightness.
Definition SegBacklightArduino.cpp:33
Abstract backlight control.
Definition SegBacklight.h:11