FastArduino  v1.7
C++ library to build fast but small Arduino/AVR projects
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< EVENT, PERIOD_MS > &)=delete
 
RTTEventCallback< EVENT, PERIOD_MS > & operator= (const RTTEventCallback< EVENT, PERIOD_MS > &)=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 535 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 554 of file realtime_timer.h.


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