Software timer pool, lists, and processing loop.
More...
#include "core.h"
#include "timer.h"
#include "thread.h"
#include "message.h"
#include "list.h"
Go to the source code of this file.
Software timer pool, lists, and processing loop.
- Author
- Snoopy3921 - AK Foundation
- Date
- 2026/05/08
Definition in file timer.c.
◆ akos_timer_create()
Create a timer object from timer pool.
- Parameters
-
| id | Timer ID. |
| sig | Signal posted on timeout. |
| func_cb | Optional callback run on timeout. |
| des_thread_id | Destination thread ID for signal posting. |
| period | Period in ticks for periodic timer. |
| type | Timer type. |
- Returns
- Timer pointer, or NULL on failure.
Definition at line 146 of file timer.c.
◆ akos_timer_init()
| void akos_timer_init |
( |
void | | ) |
|
Initialize timer module state.
Initialize timer module.
Definition at line 234 of file timer.c.
◆ akos_timer_processing()
| void akos_timer_processing |
( |
| ) |
|
Timer-task processing function.
Timer thread processing loop.
Processes expired timers, executes callbacks/posts signals, then blocks until the next timer event (or a wakeup message).
Definition at line 247 of file timer.c.
◆ akos_timer_remove()
| void akos_timer_remove |
( |
ak_timer_t * | p_timer | ) |
|
Remove timer from lists and return it to pool.
Remove timer from active lists and return to pool.
- Parameters
-
Definition at line 211 of file timer.c.
◆ akos_timer_reset()
| void akos_timer_reset |
( |
ak_timer_t * | p_timer | ) |
|
Reset a running timer to its next period.
Reset a running timer.
- Parameters
-
Definition at line 321 of file timer.c.
◆ akos_timer_start()
| void akos_timer_start |
( |
ak_timer_t * | p_timer, |
|
|
uint32_t | tick_to_wait ) |
Start timer with initial delay.
Start a timer.
- Parameters
-
| p_timer | Timer object. |
| tick_to_wait | Initial delay in ticks. |
Definition at line 306 of file timer.c.