WIZlib Library API
ver 1.0
WIZlib Library API User Menual
|
Event Alarm Module. More...
Functions | |
int8 | alarm_set (uint32 time, alarm_cbfunc cb, int8 arg) |
Add Alarm event to the waiting queue. More... | |
int8 | alarm_del (alarm_cbfunc cb, int8 arg) |
Delete Alarm event from the waiting queue. More... | |
int8 | alarm_chk (alarm_cbfunc cb, int8 arg) |
Count Alarm event which have same condition with param from the waiting queue. More... | |
void | alarm_run (void) |
Alarm Module Handler. More... | |
Event Alarm Module.
You can register delayed action through Alarm Module.
int8 alarm_chk | ( | alarm_cbfunc | cb, |
int8 | arg | ||
) |
Count Alarm event which have same condition with param from the waiting queue.
If there is not alarm event same with param, 0 value will be returned.
cb | Callback function in alarm_cbfunc form NULL value will be ignored |
arg | The value which was set when alarm event added as arg -1 value will be ignored |
int8 alarm_del | ( | alarm_cbfunc | cb, |
int8 | arg | ||
) |
Delete Alarm event from the waiting queue.
This function delete every alarm event which have same condition with param
cb | Callback function in alarm_cbfunc form NULL value will be ignored |
arg | The value which was set when alarm event added as arg -1 value will be ignored |
Definition at line 119 of file util.c.
void alarm_run | ( | void | ) |
int8 alarm_set | ( | uint32 | time, |
alarm_cbfunc | cb, | ||
int8 | arg | ||
) |
Add Alarm event to the waiting queue.
time | Delay time in tick. Max time is defined in common.h Zero time param is possible |
cb | Callback function in alarm_cbfunc form |
arg | The value which will be returned through callback function This is for separation in same callback function |
Definition at line 78 of file util.c.