Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Functions | Variables
lampda::logic::inputs Namespace Reference

Handle the system input, the behavior associated to the button inputs. More...

Functions

void button_clicked_callback (const uint8_t consecutiveButtonCheck)
 
void button_hold_callback (const uint8_t consecutiveButtonCheck, const uint32_t buttonHoldDuration)
 
void init (const bool wasPoweredByUserInterrupt)
 Call once on system start.
 
void loop ()
 Call often to handle button updates.
 
void button_disable_usermode ()
 disable custom user modes
 
bool is_button_usermode_enabled ()
 return true if custom user modes are enabled
 

Variables

static constexpr uint32_t BRIGHTNESS_RAMP_DURATION_MS = 2000
 
static constexpr uint32_t BRIGHTNESS_LOOP_UPDATE_EVERY = 20
 duration of the brightness ramp
 
bool isButtonUsermodeEnabled = false
 frequency update of the ramp
 

Detailed Description

Handle the system input, the behavior associated to the button inputs.

Function Documentation

◆ init()

void lampda::logic::inputs::init ( const bool  wasPoweredByUserInterrupt)

Call once on system start.

Parameters
[in]wasPoweredByUserInterruptIndicates if the system was powered by the user button interrupt