arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
audio_tools::TimerAlarmRepeatingESP32 Class Reference

Repeating Timer functions for simple scheduling of repeated execution. The basic logic is taken from https://www.toptal.com/embedded/esp32-audio-sampling. Plaease use the typedef TimerAlarmRepeating. More...

#include <AudioTimerESP32.h>

Inheritance diagram for audio_tools::TimerAlarmRepeatingESP32:
audio_tools::TimerAlarmRepeatingDef

Public Member Functions

 TimerAlarmRepeatingESP32 (TimerFunction function=DirectTimerCallback, int id=0)
 
bool begin (repeating_timer_callback_t callback_f, uint32_t time, TimeUnit unit=MS) override
 Starts the alarm timer. More...
 
bool end () override
 ends the timer and if necessary the task More...
 
void setCore (int core)
 
- Public Member Functions inherited from audio_tools::TimerAlarmRepeatingDef
virtual bool begin (repeating_timer_callback_t callback_f, uint32_t time, TimeUnit unit=MS)=0
 
void * callbackParameter ()
 
virtual bool end ()=0
 
void setCallbackParameter (void *obj)
 

Protected Member Functions

void setupDirectTimerCallback (repeating_timer_callback_t callback_f)
 direct timer callback
 
void setupSimpleThreadLoop (repeating_timer_callback_t callback_f)
 No timer - just a simple task loop.
 
void setupTimerCallbackInThread (repeating_timer_callback_t callback_f)
 

Static Protected Member Functions

static void complexTaskHandler (void *param)
 We can not do any I2C calls in the interrupt handler so we need to do this in a separate task.
 
static void simpleTaskLoop (void *param)
 We can not do any I2C calls in the interrupt handler so we need to do this in a separate task.
 

Protected Attributes

hw_timer_t * adc_timer = nullptr
 
int core = 1
 
TimerFunction function
 
TaskHandle_t handler_task = nullptr
 
int priority = configMAX_PRIORITIES -1
 
volatile bool started = false
 
int timer_id =0
 
uint32_t timeUs
 
UserCallback user_callback
 
- Protected Attributes inherited from audio_tools::TimerAlarmRepeatingDef
void * object =nullptr
 

Detailed Description

Repeating Timer functions for simple scheduling of repeated execution. The basic logic is taken from https://www.toptal.com/embedded/esp32-audio-sampling. Plaease use the typedef TimerAlarmRepeating.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

bool audio_tools::TimerAlarmRepeatingESP32::begin ( repeating_timer_callback_t  callback_f,
uint32_t  time,
TimeUnit  unit = MS 
)
inlineoverridevirtual

Starts the alarm timer.

Implements audio_tools::TimerAlarmRepeatingDef.

◆ end()

bool audio_tools::TimerAlarmRepeatingESP32::end ( )
inlineoverridevirtual

ends the timer and if necessary the task

Implements audio_tools::TimerAlarmRepeatingDef.


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