Provides functionality to set alarms. More...
|Initialize the alarm functionality. More...|
|Resets the alarm functionality. |
|char *||alarm_name ()|
|Obtain the name of the alarm software component. More...|
|bool||alarm_set (uint_base_t a_time, signal_t a_signal)|
|Register a new alarm that will emit the given signal when due. More...|
|bool||alarm_set_cb (uint_base_t a_time, p_callback_func_t a_func)|
|Register a new alarm that will call the given function when due. More...|
|Checks which alarms are due and lets them go off. |
Provides functionality to set alarms.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Definition in file glm_alarm.h.
Register a new alarm that will emit the given signal when due.
The delay is given in ticks, where one tick equals 1/CORE_TICK_FREQ_HZ seconds.
|a_time||Time to wait before emitting the signal in ticks.|
|a_signal||The signal to emit when the alarm is due.|
Register a new alarm that will call the given function when due.
The callback function should take no arguments and return nothing.
Note that the callback function should perform very little executions (e.g. just set or clear a flag) since its execution time, together with other alarms that may be due in the same alarm_check_due()-call, may result in crossing the scheduler's slot boundary and thus potentially screwing up the scheduling of the multitasking system!
|a_time||Time from now in 1/CORE_TICK_FREQ_HZ seconds when alarm should go off.|
|a_func||The function to call when the alarm is due.|