Embedded Artistry Framework
Embedded Systems C++ Framework
Classes | Typedefs | Enumerations

Definitions, functions, and classes related to Timer devices. More...

Classes

class  Timer
 This class provides generic Timer interface definitions. More...
 

Typedefs

using freq_hz_t = std::chrono::duration< uint64_t, std::ratio< 1 > >
 Represents the frequency of the timer, in Hz. More...
 
using timer_period_t = std::chrono::duration< uint64_t, std::micro >
 Represents the period of the timer, in microseconds. More...
 
using cb_t = stdext::inplace_function< void(void)>
 Alias for timer callback functions. More...
 

Enumerations

enum  config : uint8_t { config::oneshot = 0, config::periodic }
 Configuration for the timer. More...
 
enum  state : uint8_t { state::stopped = 0, state::expired, state::armed }
 Possible timer states. More...
 

Detailed Description

Definitions, functions, and classes related to Timer devices.

Typedef Documentation

◆ cb_t

using embvm::timer::cb_t = typedef stdext::inplace_function<void(void)>

Alias for timer callback functions.

◆ freq_hz_t

using embvm::timer::freq_hz_t = typedef std::chrono::duration<uint64_t, std::ratio<1> >

Represents the frequency of the timer, in Hz.

◆ timer_period_t

using embvm::timer::timer_period_t = typedef std::chrono::duration<uint64_t, std::micro>

Represents the period of the timer, in microseconds.

Enumeration Type Documentation

◆ config

Configuration for the timer.

Enumerator
oneshot 

The timer will run once, and then will remain in the expired state until reconfigured.

periodic 

When the timer expires, the existing configuration will be reloaded and it will be rearmed.

◆ state

Possible timer states.

Enumerator
stopped 

The timer has been manually stopped or is not yet configured.

expired 

The timer has expired and is no longer running.

armed 

The timer is armed and running.