#include <nitro/os.h>
void OS_SetPeriodicAlarm(
OSAlarm* alarm,
OSTick start ,
OSTick period ,
OSAlarmHandler handler,
void* arg );
alarm | Pointer to the alarm structure that sets up an alarm |
start | Tick count for first actuation of the alarm (calling the handler) (This is not a relative value from the current time, but an absolute value.) |
period | Interval at which the alarm will be activated |
handler | The alarm handler |
arg | Argument used when the alarm handler is called |
None.
Sets a periodic alarm.
The alarm handler handler is first called when the tick value equals start . The V count alarm handler handler
is an OSVAlarmHandler
function type defined by the following:
typedef void (*OSAlarmHandler)( void*);
When the handler
is called, it takes arg
as an argument. handler
is called from the OS timer interrupt handler. Therefore, interrupts are prohibited.
One tick count unit is 1/64 of the hardware system clock.
If alarm
specifies the pointer to the OSAlarm
structure which the alarm has set, OS_Panic
stops the alarm.
OS_CancelAlarm
is used to stop the alarm.
OS_InitAlarm, OS_CreateAlarm, OS_SetAlarm, OS_CancelAlarm
OS_*SecondsToTick
03/08/2005 Standardized the use of the term 'interrupt' in Japanese.
12/22/2004 Added a statement about the alarm handler being called from the timer interrupt handler.
08/30/2004 Added statement about not being able to use the set alarm structure.
02/25/2004 Changed systemClock to tick
02/04/2004 Initial version