Download GCTR - grifo¨ COM

Transcript
grifo®
ITALIAN TECHNOLOGY
_DOS_SETDATE
Definition:
#include <DOS.H>
unsigned char _dos_setdate(struct dosdate_t *datep);
Library:
CL.LIB
Description:
Function _dos_setdate sets on Real Time Clock of control card the date stored in the structured
variable datep. This latter must be a pointer to the type dosdate_t, declared in the header DOS.H, that
contains four variables: day (unsigned char), month (unsigned char), year (unsigned int) and
dayofweek (unsigned char).
Example:
struct dosdate_t dd;
dd.day=1;
dd.month=1;
dd.year=0;
_dos_setdate(&dd);
// Sets RTC to beginning of century
Parameters returned:
Function _dos_setdate always returns 0 to indicate that setting has been succesful.
_DOS_SETTIME
Definition:
#include <DOS.H>
unsigned char _dos_settime(struct dostime_t *timep);
Library:
CL.LIB
Description:
Function _dos_settime sets on Real Time Clock of control card the time stored in the structured
variable timep. This latter must be a pointer to a variable of type dostime_t, declared in header file
DOS.H, that contains four variables hour, minute, second, hsecond (all usigned char). Control card
RTC does not manage hundreds of seconds (structure member hsecond), so it is not evalued by the
function.
Example:
struct dostime_t tt;
tt.hour=tt.minute=tt.second=1;
_dos_setdate(&tt);
// Sets RTC to beginning of day
Parameters returned:
Function _dos_settime always returns 0 to indicate that setting has been succesful.
GCTR
Rel. 5.40
Page B-7