![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_131.png)
23-4
Timer Tools
Programmer’s Manual
Return Value
23.6
AlarmSetId
Syntax
STATUS
AlarmSetId
(P_U32 alarmId U16 year U16 month, U16 date, U16
hour U16 minute U16 second)
Description
Set alarm at specific time and return the alarm id. When the time reaches the
alarm time, a message with the alarm id, will be passed to the task. Even if the
task is swapped out or the system goes to sleep, the alarm task will still be
swapped in and the system will wake up. However, if more than one alarm
tasks happen, the earlier the alarm is set, the earlier the task will be swapped
in. If alarmId is 0, no alarm id will be given but the alarm will still be set. So if
several alarms are set at the same time, the task will first swap to the aSyntax
task which set the alarm first, then the second, etc. However, this version the
alarm will stop in the task which set the alarm first only, although the alarm
messages are sent to other tasks also.
Parameter
Name
Description
PPSM_OK
Successful operation
PPSM_ERR_YEAR
Invalid year value
PPSM_ERR_MONTH
Invalid month value
PPSM_ERR_DAY
Invalid day value
PPSM_ERR_HOUR
Invalid hour value
PPSM_ERR_MINUTE
Invalid minute value
PPSM_ERR_SECOND
Invalid second value
Name
Description
alarmId
The pointer to the alarm id set with
specific time
year
Alarm year which must be greater than or
equal to 1900
month
Alarm month from 1 to 12
date
Alarm date from 1 to 28, 30 or 31
depending on the month and year values.
hour
Alarm hour from 0 to 23
Personal Portable System Manager
Programmer’s Manual
Timer Tools
23-1
Chapter 23 Timer Tools
23.1
AlarmClear
Syntax
void
AlarmClear
(void)
Description
Clear all alarms set for current task. This will not affect those alarms set for
other tasks.
Parameter
Return Value
void
AlarmClearId
(U32
Description
This function will clear the alarm in the alarm list specified by
alarm set can be of any task.
. The
Parameter
Return Value
Name
Description
None
Name
Description
None
Name
Description
alarmId
Name
Description
None
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.