FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
timer::RTTEventCallback< EVENT, PERIOD_MS > Class Template Reference

Utility to generate events from an RTT instance at a given period. More...

#include <fastarduino/realtime_timer.h>

Public Member Functions

 RTTEventCallback (const RTTEventCallback &)=delete
 
RTTEventCallbackoperator= (const RTTEventCallback &)=delete
 
 RTTEventCallback (containers::Queue< EVENT > &event_queue)
 Create a RTTEventCallback that will push periodic events to event_queue. More...
 

Friends

struct isr_handler_rtt
 

Detailed Description

template<typename EVENT, uint32_t PERIOD_MS = 1024>
class timer::RTTEventCallback< EVENT, PERIOD_MS >

Utility to generate events from an RTT instance at a given period.

The generated events have type events::Type::RTT_TIMER.

Template Parameters
EVENTthe events::Event<T> type to be generated
PERIOD_MSthe period, in ms, at which events will be generated; this must be a power of 2.
See also
RTT
REGISTER_RTT_EVENT_ISR

Definition at line 534 of file realtime_timer.h.

Constructor & Destructor Documentation

◆ RTTEventCallback()

template<typename EVENT , uint32_t PERIOD_MS = 1024>
timer::RTTEventCallback< EVENT, PERIOD_MS >::RTTEventCallback ( containers::Queue< EVENT > &  event_queue)
inlineexplicit

Create a RTTEventCallback that will push periodic events to event_queue.

Parameters
event_queuethe event queue which new events will be pushed to

NOTE: for this to work, you need to register the proper ISR with REGISTER_RTT_EVENT_ISR().

See also
REGISTER_RTT_EVENT_ISR

Definition at line 553 of file realtime_timer.h.

Friends And Related Function Documentation

◆ isr_handler_rtt

template<typename EVENT , uint32_t PERIOD_MS = 1024>
friend struct isr_handler_rtt
friend

Definition at line 563 of file realtime_timer.h.


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