arduino-audio-tools
Loading...
Searching...
No Matches
AudioTimer Class Reference

Common Interface definition for AudioTimer. More...

#include <CodecOpusOgg.h>

Public Member Functions

 AudioTimer ()=default
 Default constructor.
 AudioTimer ()=default
 Default constructor.
 AudioTimer (AudioTimerDriverBase &timer)
 Construct a new Timer Alarm Repeating object by passing your object which has been customized with some special platform specific parameters.
 AudioTimer (AudioTimerDriverBase &timer)
 Construct a new Timer Alarm Repeating object by passing your object which has been customized with some special platform specific parameters.
virtual ~AudioTimer ()=default
virtual ~AudioTimer ()=default
bool begin (repeating_timer_callback_t callback_f, uint32_t time, TimeUnit unit=MS)
bool begin (repeating_timer_callback_t callback_f, uint32_t time, TimeUnit unit=MS)
void * callbackParameter ()
void * callbackParameter ()
AudioTimerDriverBase * driver ()
 Provides access to the driver.
AudioTimerDriverBase * driver ()
 Provides access to the driver.
bool end ()
bool end ()
 operator bool ()
 Returns true if the timer is active.
 operator bool ()
 Returns true if the timer is active.
void setCallbackParameter (void *obj)
void setCallbackParameter (void *obj)
void setDriver (AudioTimerDriverBase &timer)
 Allows to set a different driver.
void setDriver (AudioTimerDriverBase &timer)
 Allows to set a different driver.
void setIsSave (bool is_save)
void setIsSave (bool is_save)
virtual void setTimer (int timer)
virtual void setTimer (int timer)
virtual void setTimerFunction (TimerFunction function=DirectTimerCallback)
virtual void setTimerFunction (TimerFunction function=DirectTimerCallback)

Protected Attributes

bool is_active = false
void * object = nullptr
AudioTimerDriverBase * p_timer = &timer
AudioTimerDriver timer

Detailed Description

Common Interface definition for AudioTimer.

Constructor & Destructor Documentation

◆ AudioTimer() [1/4]

AudioTimer ( )
default

Default constructor.

◆ AudioTimer() [2/4]

AudioTimer ( AudioTimerDriverBase & timer)
inline

Construct a new Timer Alarm Repeating object by passing your object which has been customized with some special platform specific parameters.

Parameters
timer

◆ ~AudioTimer() [1/2]

virtual ~AudioTimer ( )
virtualdefault

◆ AudioTimer() [3/4]

AudioTimer ( )
default

Default constructor.

◆ AudioTimer() [4/4]

AudioTimer ( AudioTimerDriverBase & timer)
inline

Construct a new Timer Alarm Repeating object by passing your object which has been customized with some special platform specific parameters.

Parameters
timer

◆ ~AudioTimer() [2/2]

virtual ~AudioTimer ( )
virtualdefault

Member Function Documentation

◆ begin() [1/2]

bool begin ( repeating_timer_callback_t callback_f,
uint32_t time,
TimeUnit unit = MS )
inline

◆ begin() [2/2]

bool begin ( repeating_timer_callback_t callback_f,
uint32_t time,
TimeUnit unit = MS )
inline

◆ callbackParameter() [1/2]

void * callbackParameter ( )
inline

◆ callbackParameter() [2/2]

void * callbackParameter ( )
inline

◆ driver() [1/2]

AudioTimerDriverBase * driver ( )
inline

Provides access to the driver.

◆ driver() [2/2]

AudioTimerDriverBase * driver ( )
inline

Provides access to the driver.

◆ end() [1/2]

bool end ( )
inline

◆ end() [2/2]

bool end ( )
inline

◆ operator bool() [1/2]

operator bool ( )
inline

Returns true if the timer is active.

◆ operator bool() [2/2]

operator bool ( )
inline

Returns true if the timer is active.

◆ setCallbackParameter() [1/2]

void setCallbackParameter ( void * obj)
inline

◆ setCallbackParameter() [2/2]

void setCallbackParameter ( void * obj)
inline

◆ setDriver() [1/2]

void setDriver ( AudioTimerDriverBase & timer)
inline

Allows to set a different driver.

◆ setDriver() [2/2]

void setDriver ( AudioTimerDriverBase & timer)
inline

Allows to set a different driver.

◆ setIsSave() [1/2]

void setIsSave ( bool is_save)
inline

◆ setIsSave() [2/2]

void setIsSave ( bool is_save)
inline

◆ setTimer() [1/2]

virtual void setTimer ( int timer)
inlinevirtual

◆ setTimer() [2/2]

virtual void setTimer ( int timer)
inlinevirtual

◆ setTimerFunction() [1/2]

virtual void setTimerFunction ( TimerFunction function = DirectTimerCallback)
inlinevirtual

◆ setTimerFunction() [2/2]

virtual void setTimerFunction ( TimerFunction function = DirectTimerCallback)
inlinevirtual

Member Data Documentation

◆ is_active

bool is_active = false
protected

◆ object

void * object = nullptr
protected

◆ p_timer

AudioTimerDriverBase * p_timer = &timer
protected

◆ timer

AudioTimerDriver timer
protected

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