
Chapter 3 Terminal Specific Function Library
71
3.5.2 Alarm
These are applicable to the Optimus S only.
GetAlarm
Optimus S
Purpose
To get the current alarm time.
Syntax
void GetAlarm (char *cur_time);
char *cur_time; /* pointer a buffer where alarm time will be copied to */
Example
GetAlarm (alarm_time);
Description
This routine reads the current alarm time and copies it to a character array
(
cur_time
).
The character array
cur_time
allocated must have a minimum of 15 bytes
to accommodate the date, time, and the string terminator.
The format of the system date and time is "YYYYMMDDhhmmss".
Return
None
See Also
SetAlarm
SetAlarm
Optimus S
Purpose
To set the alarm time.
Syntax
void SetAlarm (char *new_time);
char *new_time;
Example
SetAlarm ("20050805125800"); /* AUGUST 5, 2005 12:58:00 */
Description
This routine sets alarm time (
new_time
). The character string
new_time
must
have the following format, "YYYYMMDDhhmmss".
YYYY:
year
4 digits
MM:
month
2 digits,
01 ~ 12
DD:
day
2 digits,
01 ~ 31
hh:
hour
2 digits,
00 ~ 23
mm:
minute
2 digits,
00 ~ 59
ss:
second
2 digits,
00 ~ 59
If the format is invalid (e.g. set hour to 25), the operation is simply denied and
the time remains unchanged.
Return
None
See Also
GetAlarm
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...