
72
Purpose
:
Set new date and time to the calendar chip.
Syntax
:
int set_time(char *new_time);
Example call
:
set_time(“20030401223035”);
Includes
:
#include “LIB_CL.h ”
Description
:
The set_time function set a new system date and time specified
in the argument new_time to the calendar chip. The character
string new_time must have the following format,
"YYYYMMDDhhmmss"
YYYY
year, 4 digits
MM
month, 2 digits, 1-12
DD
day, 2 digits, 1-31
hh
hour, 2 digits, 0-23
mm
minute, 2 digits, 0-59
ss
second, 2 digits, 0-59
Ps. When it execute in simulator, the time will not change.
Returns
:
Normally the set_time function always returns an integer value of
1. If the calendar chip malfunctions, the set_time function will then
return 0 to 0 error. Also, if the format is illegal (e.g. set hour to
25), the operation is simply denied and the time is not changed.
◆
File Manipulation
__access
Purpose
:
Check for file existence.
Syntax
:
int __access(char *filename);
Example call
:
if(__access(“C:\\data\\store.dat”) _puts(“store.dat exist!!”);
Includes
:
#include “LIB_CL.h ”
Description
:
Check if the file specified by filename
.
Returns
:
If the file specified by filename exist, access returns an integer
value of 1, 0 otherwise. In case of error, access will return an
integer value of -1 and an error code is set to the global variable
fErrorCode to indicate the error condition encountered. Possible
error codes and theirinterpretation are listed below.
fErrorCode
:
1: filename is a NULL string.
append
Содержание 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 ...