OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
SingleLED Class Reference

A simple LED driver for a single LED. More...

#include <OutputHardware.hpp>

Public Member Functions

 SingleLED (OutputGPIO pin)
 Create a new single-LED driver.
 
void set (bool state)
 Set the state of the LED.
 
bool get ()
 Get the state of the LED.
 
void swap ()
 Invert the state of the LED.
 
void show ()
 Show the state of the LED.
 

Detailed Description

A simple LED driver for a single LED.

Note
You may attach two or more LEDs to the output pin, but all of them will behave as a single LED.

Definition at line 289 of file OutputHardware.hpp.

Constructor & Destructor Documentation

◆ SingleLED()

SingleLED::SingleLED ( OutputGPIO pin)

Create a new single-LED driver.

Parameters
pin

◆ ~SingleLED()

SingleLED::~SingleLED ( )
inline

Definition at line 327 of file OutputHardware.hpp.

Member Function Documentation

◆ get()

bool SingleLED::get ( )
inline

Get the state of the LED.

Returns
true If on
false If off

Definition at line 312 of file OutputHardware.hpp.

◆ set()

void SingleLED::set ( bool state)
inline

Set the state of the LED.

Parameters
statetrue to turn on, false to turn off.

Definition at line 304 of file OutputHardware.hpp.

◆ swap()

void SingleLED::swap ( )
inline

Invert the state of the LED.

Note
Not displayed immediately

Definition at line 319 of file OutputHardware.hpp.


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