Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
button.h File Reference

Interface for the physical components of the push button. More...

Go to the source code of this file.

Classes

struct  lampda::physical::button::ButtonStateTy
 Store the button status and characteristics. More...
 

Namespaces

namespace  lampda
 Program scope.
 
namespace  lampda::physical
 Handle the physical modules drivers.
 
namespace  lampda::physical::button
 Handle the button inputs and multiple click detection.
 

Functions

void lampda::physical::button::init (const bool isSystemStartedFromButton)
 
void lampda::physical::button::handle_events (const std::function< void(uint8_t)> &clickSerieCallback, const std::function< void(uint8_t, uint32_t)> &clickHoldSerieCallback)
 handle the button clicked events
 
bool lampda::physical::button::is_system_start_click ()
 Indicates that this click is the one triggered by the system start It is set to false after the click chain stops.
 
ButtonStateTy lampda::physical::button::get_button_state ()
 Get a copy of the raw internal button state.
 
platform::gpio::DigitalPin::GPIO lampda::physical::button::get_button_pin ()
 Return the pin used for the button.
 
void lampda::physical::button::set_button_pin (const platform::gpio::DigitalPin::GPIO buttonPin)
 Only on system start, set the pin where the button is wired.
 
int lampda::physical::button::get_button_pin_RAW ()
 get the button pin index in system. USE WITH CAUTION
 

Detailed Description

Interface for the physical components of the push button.