
71
◆
Calender
DayOfWeek
Purpose
:
Get the day of the week information.
Syntax
:
int DayOfWeek(void);
Example call
:
day=DayOfWeek( );
Includes
:
#include “LIB_CL.h ”
Description
:
The DayOfWeek function returns the day of week information
based on current date.
Returns
:
The DayOfWeek function returns an integer indicating the day of
week information. A value of 1 to 6 represents Monday to
Saturday accordingly. And a value of 7 indicates Sunday.
get_time
Purpose
:
Get current date and time
Syntax
:
int get_time(char *cur_time);
Example call
:
char system_time[16];
get_time(system_time);
Includes
:
#include “LIB_CL.h ”
Description
:
The get_time function reads current date and time from the
calendar chip and copies them to a character array specified in
the argument 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 listed below.
"YYYYMMDDhhmmss"
YYYY
year, 4 digits
MM
month, 2 digits
DD
day, 2 digits
hh
hour, 2 digits
mm
minute, 2 digits
ss
second, 2 digits
Returns
:
Normally the get_time function always returns an integer value of
0. If the calendar chip malfunctions, the get_time function will
then return 1 to indicate error.
set_time
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...