LightHub 4.6.0
Open-source smart home controller firmware
Loading...
Searching...
No Matches
StatusLED Class Reference

RGB status LED controller. More...

#include <statusled.h>

Public Member Functions

 StatusLED (uint8_t pattern=0)
 Initializes the LED pins and sets the initial pattern.
void set (uint8_t pattern)
 Sets the steady/blinking LED pattern.
void show (uint8_t pattern)
 Immediately drives the pins to the given color (no state change).
void poll ()
 Advances blink/flash timing; call from the main loop.
void flash (uint8_t pattern)
 Shows the given pattern once (single flash).

Detailed Description

RGB status LED controller.

Drives the onboard RGB status LED (Due: pins 50-52, AVR: 47-49) with color patterns, single flashes and slow/fast blinking. Used by the system to signal state (e.g. errors blink red).

Constructor & Destructor Documentation

◆ StatusLED()

StatusLED::StatusLED ( uint8_t pattern = 0)

Initializes the LED pins and sets the initial pattern.

Parameters
patternInitial LED pattern bits.

Member Function Documentation

◆ flash()

void StatusLED::flash ( uint8_t pattern)

Shows the given pattern once (single flash).

Parameters
patternLED pattern bits to flash.

◆ poll()

void StatusLED::poll ( )

Advances blink/flash timing; call from the main loop.

◆ set()

void StatusLED::set ( uint8_t pattern)

Sets the steady/blinking LED pattern.

Parameters
patternLED pattern bits.

◆ show()

void StatusLED::show ( uint8_t pattern)

Immediately drives the pins to the given color (no state change).

Parameters
patternLED pattern bits.

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