Skip to content

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

constexpr uint16_t daisy::UiEventQueue::invalidButtonId;

A button ID used to indicate an invalid or non existing button.


variable invalidEncoderId

constexpr uint16_t daisy::UiEventQueue::invalidEncoderId;

An encoder ID used to indicate an invalid or non existing encoder.


variable invalidPotId

constexpr uint16_t daisy::UiEventQueue::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

inline void daisy::UiEventQueue::AddButtonReleased (
    uint16_t buttonID
) 

Adds a Event::EventType::buttonReleased event to the queue.


function AddEncoderActivityChanged

inline void daisy::UiEventQueue::AddEncoderActivityChanged (
    uint16_t encoderId,
    bool isActive
) 

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

inline void daisy::UiEventQueue::AddPotActivityChanged (
    uint16_t potId,
    bool isActive
) 

Adds a Event::EventType::potActivityChanged event to the queue.


function AddPotMoved

inline void daisy::UiEventQueue::AddPotMoved (
    uint16_t potId,
    float newPosition
) 

Adds a Event::EventType::potMoved event to the queue.


function GetAndRemoveNextEvent

inline Event daisy::UiEventQueue::GetAndRemoveNextEvent () 

Removes and returns an event from the queue.


function IsQueueEmpty

inline bool daisy::UiEventQueue::IsQueueEmpty () 

Returns true, if the queue is empty.


function UiEventQueue

inline daisy::UiEventQueue::UiEventQueue () 

function __attribute__

inline struct daisy::UiEventQueue::__attribute__ (
    ( packed )
) 

An event in the queue


function ~UiEventQueue

inline daisy::UiEventQueue::~UiEventQueue () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/ui/UiEventQueue.h