FastArduino  v1.7
C++ library to build fast but small Arduino/AVR projects
events::Type Namespace Reference

Defines pre-defined types of events gegenarted by FastArduino API. More...

Variables

const uint8_t NO_EVENT = 0
 Special event type attached to no event at all. More...
 
const uint8_t WDT_TIMER = 1
 Type of events generated by watchdog::Watchdog for each watchdog timeout interrupt. More...
 
const uint8_t RTT_TIMER = 2
 Type of events generated by timer::RTTEventCallback whenever elapsed RTT::millis() reaches a multiple of PERIOD_MS. More...
 
const uint8_t USER_EVENT = 128
 The first ordinal event type that you may use for your own custom events. More...
 

Detailed Description

Defines pre-defined types of events gegenarted by FastArduino API.

The type of an event is coded as an unsigned byte.

All numbers from 0 to 127 are reserved for fastArduino library and should not be used for user-defined custom event types.

See also
Event

Variable Documentation

◆ NO_EVENT

const uint8_t events::Type::NO_EVENT = 0

Special event type attached to no event at all.

This may be used by methods returning an event without waiting for one to be available.

Definition at line 98 of file events.h.

◆ WDT_TIMER

const uint8_t events::Type::WDT_TIMER = 1

Type of events generated by watchdog::Watchdog for each watchdog timeout interrupt.

See also
watchdog::Watchdog

Definition at line 105 of file events.h.

◆ RTT_TIMER

const uint8_t events::Type::RTT_TIMER = 2

Type of events generated by timer::RTTEventCallback whenever elapsed RTT::millis() reaches a multiple of PERIOD_MS.

See also
timer::RTTEventCallback

Definition at line 112 of file events.h.

◆ USER_EVENT

const uint8_t events::Type::USER_EVENT = 128

The first ordinal event type that you may use for your own custom events.

You would generally define all your custom event types as constant:

static const uint8_t MY_EVENT_TYPE = events::Type::USER_EVENT;
static const uint8_t MY_OTHER_EVENT_TYPE = events::Type::USER_EVENT + 1;

You can define up to 127 event types on your own, from 128 to 255.

Definition at line 123 of file events.h.

events::Type::USER_EVENT
const uint8_t USER_EVENT
The first ordinal event type that you may use for your own custom events.
Definition: events.h:123