diff options
Diffstat (limited to 'firmware/export/kernel.h')
-rw-r--r-- | firmware/export/kernel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h index 51eb635004..9438f6d308 100644 --- a/firmware/export/kernel.h +++ b/firmware/export/kernel.h @@ -207,6 +207,18 @@ int tick_add_task(void (*f)(void)); int tick_remove_task(void (*f)(void)); extern void tick_start(unsigned int interval_in_ms); +/* inline helper for implementing target interrupt handler */ +static inline void call_tick_tasks(void) +{ + extern void (*tick_funcs[MAX_NUM_TICK_TASKS+1])(void); + int i; + + current_tick++; + + for (i = 0; tick_funcs[i] != NULL; i++) + tick_funcs[i](); +} + struct timeout; /* timeout callback type |