Class daisy::UiEventQueue¶
ClassList > daisy > UiEventQueue
A queue that holds user input events in the UI system.More...
#include <UiEventQueue.h>
Public Static Attributes¶
Type | Name |
---|---|
constexpr uint16_t | invalidButtonId = [**UINT16\_MAX**](classdaisy_1_1Apds9960.md) |
constexpr uint16_t | invalidEncoderId = [**UINT16\_MAX**](classdaisy_1_1Apds9960.md) |
constexpr uint16_t | invalidPotId = [**UINT16\_MAX**](classdaisy_1_1Apds9960.md) |
Public Functions¶
Type | Name |
---|---|
void | AddButtonPressed (uint16_t buttonID, uint16_t numSuccessivePresses, bool isRetriggering=false) |
void | AddButtonReleased (uint16_t buttonID) |
void | AddEncoderActivityChanged (uint16_t encoderId, bool isActive) |
void | AddEncoderTurned (uint16_t encoderID, int16_t increments, uint16_t stepsPerRev) |
void | AddPotActivityChanged (uint16_t potId, bool isActive) |
void | AddPotMoved (uint16_t potId, float newPosition) |
Event | GetAndRemoveNextEvent () |
bool | IsQueueEmpty () |
UiEventQueue () |
|
struct | __attribute__ ((packed)) |
~UiEventQueue () |
Detailed Description¶
Author:
jelliesen
A queue that holds user interface events such as button presses or encoder turns. The queue can be filled from hardware drivers and read from a UI object. Access to the queue is protected by a ScopedIrqBlocker - that means it's safe to add events from interrupt handlers.
Public Static Attributes Documentation¶
variable invalidButtonId¶
A button ID used to indicate an invalid or non existing button.
variable invalidEncoderId¶
An encoder ID used to indicate an invalid or non existing encoder.
variable invalidPotId¶
A potentiometer ID used to indicate an invalid or non existing potentiometer.
Public Functions Documentation¶
function AddButtonPressed¶
inline void daisy::UiEventQueue::AddButtonPressed (
uint16_t buttonID,
uint16_t numSuccessivePresses,
bool isRetriggering=false
)
Adds a Event::EventType::buttonPressed event to the queue.
function AddButtonReleased¶
Adds a Event::EventType::buttonReleased event to the queue.
function AddEncoderActivityChanged¶
Adds a Event::EventType::encoderActivityChanged event to the queue.
function AddEncoderTurned¶
inline void daisy::UiEventQueue::AddEncoderTurned (
uint16_t encoderID,
int16_t increments,
uint16_t stepsPerRev
)
Adds a Event::EventType::encoderTurned event to the queue.
function AddPotActivityChanged¶
Adds a Event::EventType::potActivityChanged event to the queue.
function AddPotMoved¶
Adds a Event::EventType::potMoved event to the queue.
function GetAndRemoveNextEvent¶
Removes and returns an event from the queue.
function IsQueueEmpty¶
Returns true, if the queue is empty.
function UiEventQueue¶
function __attribute__¶
An event in the queue
function ~UiEventQueue¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/ui/UiEventQueue.h