SegLCDLib
Loading...
Searching...
No Matches
SegBacklightArduino Class Reference

Arduino GPIO/PWM implementation of backlight control. More...

#include <SegBacklightArduino.h>

Inheritance diagram for SegBacklightArduino:
SegBacklight

Public Member Functions

 SegBacklightArduino (uint8_t pin, bool activeHigh=true)
 Create Arduino backlight control.
 
void init (bool pwm) override
 Initialize the backlight output.
 
void setDigital (bool state) override
 Drive the backlight on/off.
 
void setBrightness (uint8_t brightness) override
 Drive the backlight brightness.
 
- Public Member Functions inherited from SegBacklight
virtual ~SegBacklight ()=default
 

Private Attributes

uint8_t _pin
 
bool _activeHigh
 

Detailed Description

Arduino GPIO/PWM implementation of backlight control.

Constructor & Destructor Documentation

◆ SegBacklightArduino()

SegBacklightArduino::SegBacklightArduino ( uint8_t  pin,
bool  activeHigh = true 
)

Create Arduino backlight control.

Parameters
pinBacklight GPIO pin
activeHightrue if backlight is active high (default), false for active low

Member Function Documentation

◆ init()

void SegBacklightArduino::init ( bool  pwm)
overridevirtual

Initialize the backlight output.

Parameters
pwmtrue to prepare PWM/brightness control, false for plain digital on/off

Implements SegBacklight.

◆ setBrightness()

void SegBacklightArduino::setBrightness ( uint8_t  brightness)
overridevirtual

Drive the backlight brightness.

Parameters
brightnessBrightness level 0-255

Implements SegBacklight.

◆ setDigital()

void SegBacklightArduino::setDigital ( bool  state)
overridevirtual

Drive the backlight on/off.

Parameters
statetrue to turn the backlight on, false to turn it off

Implements SegBacklight.

Field Documentation

◆ _activeHigh

bool SegBacklightArduino::_activeHigh
private

◆ _pin

uint8_t SegBacklightArduino::_pin
private

The documentation for this class was generated from the following files: