|
arduino-audio-tools
|
Repeating Timer driver for Zephyr using k_timer. More...
#include <AudioTimerZephyr.h>
Public Member Functions | |
| AudioTimerDriverZephyr ()=default | |
| ~AudioTimerDriverZephyr () | |
| bool | begin (repeating_timer_callback_t callback_f, uint32_t time, TimeUnit unit=MS) override |
| Starts the repeating timer. | |
| void * | callbackParameter () |
| bool | end () override |
| Stops the timer. | |
| void | setCallbackParameter (void *obj) |
| void | setIsSave (bool is_save) override |
| Sets whether timer callbacks should be safe (execute in thread context) | |
| virtual void | setTimer (int timer) |
| void | setTimerFunction (TimerFunction function) override |
| Sets the callback execution mode. | |
Protected Member Functions | |
| void | executeCallback () |
| const char * | toString (TimeUnit unit) |
Static Protected Member Functions | |
| static void | timerExpiredCallback (struct k_timer *timer_ptr) |
| static void | workCallback (k_work *work_ptr) |
Protected Attributes | |
| repeating_timer_callback_t | callback = nullptr |
| bool | is_running = false |
| void * | object = nullptr |
| uint64_t | period_us = 0 |
| struct k_timer | timer = {} |
| TimerFunction | timer_function = DirectTimerCallback |
| bool | timer_initialized = false |
| struct k_work | work = {} |
Repeating Timer driver for Zephyr using k_timer.
Implements AudioTimerDriverBase using Zephyr's kernel timer API (k_timer). Supports both callback-based and thread-based execution modes.
Characteristics:
|
default |
|
inline |
|
inlineoverridevirtual |
Starts the repeating timer.
Implements AudioTimerDriverBase.
|
inlineinherited |
|
inlineoverridevirtual |
Stops the timer.
Reimplemented from AudioTimerDriverBase.
|
inlineprotected |
Sets whether timer callbacks should be safe (execute in thread context)
Reimplemented from AudioTimerDriverBase.
Reimplemented in AudioTimerDriverRenesas, and AudioTimerDriverSTM32.
|
inlineoverridevirtual |
Sets the callback execution mode.
Reimplemented from AudioTimerDriverBase.
Static callback wrapper for k_timer This is invoked in interrupt context, so we either call directly or defer to system workqueue.
|
protected |
|
protected |
|
protected |