Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ersa::hal::IInput Class Referenceabstract

#include <input.h>

Public Member Functions

virtual ~IInput ()=default
 
virtual Result< void > init ()=0
 
virtual void poll ()=0
 
virtual bool isPressed (events::ButtonId button) const =0
 
virtual bool hasPendingEvents () const =0
 

Detailed Description

Normalized board input events and button state.

The BSP supplies physical pin assignments and polarity; this interface exposes product-relative buttons and normalized events. As a result, apps never need to poll GPIO numbers or know whether a switch is active low.

Constructor & Destructor Documentation

◆ ~IInput()

virtual ersa::hal::IInput::~IInput ( )
virtualdefault

Member Function Documentation

◆ hasPendingEvents()

virtual bool ersa::hal::IInput::hasPendingEvents ( ) const
pure virtual

Report queued normalized input events that still need application dispatch.

◆ init()

virtual Result< void > ersa::hal::IInput::init ( )
pure virtual

Configure board pins, debounce state, and event publication.

◆ isPressed()

virtual bool ersa::hal::IInput::isPressed ( events::ButtonId  button) const
pure virtual

Query current debounced state using a logical ButtonId.

◆ poll()

virtual void ersa::hal::IInput::poll ( )
pure virtual

Sample/debounce physical controls and post resulting events. Call regularly from the application task; hardware callbacks should not call app code directly.


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