#sccs "@(#)uts/kern/sys:rtc.h 1.1" /* Convergent Technologies - System V - June 1983 */ /* real time clock */ #include /* */ /* REAL TIME CLOCK TC8250P */ /* WRITE MODE */ /* Uses upper byte of I/O address 0x480000 */ /* Upper 4 bits used to control chip operation */ /* Lower 4 bits used for internal chip addressing and I/O data */ #define RTC_WRITE_ADDR ((unsigned short *)0x480000) /* RTC write address */ #define RTCCE 0x8000 /* real time clock chip select*/ #define RTCALE 0x4000 /* RTC address latch enable */ #define RTCRW 0x2000 /* RTC write enable, inverse=read enable */ #define RTCDE 0x1000 /* RTC write data enable */ /* READ MODE */ /* Uses upper byte of I/O address 0xe30000 */ /* Uses lower 4 bits only */ #define RTC_READ_ADDR ((unsigned short *)0xe30000) /* RTC read addr */ /* ADDRESS MODES */ #define ONE_SEC_DIGT 0x0000 /* 1 sec digit */ #define TEN_SEC_DIGT 0x0100 /* 10 sec digit */ #define ONE_MIN_DIGT 0x0200 /* 1 minute digit */ #define TEN_MIN_DIGT 0x0300 /* 10 minutes digit */ #define ONE_HR_DIGT 0x0400 /* 1 hour digit */ #define TEN_HR_DIGT 0x0500 /* 10 hours digit */ #define ONE_DAY_DIGT 0x0600 /* 1 day digit */ #define TEN_DAY_DIGT 0x0700 /* 10 days digit */ #define ONE_MNTH_DIGT 0x0800 /* 1 month digit */ #define TEN_MNTH_DIGT 0x0900 /* 10 month digit */ #define ONE_YR_DIGT 0x0a00 /* 1 year digit */ #define TEN_YR_DIGT 0x0b00 /* 10 year digit */ #define WEEK_DAY 0x0c00 /* day of the week */ #define TOUT_CONTROL 0x0d00 /* Tout control */ #define PROTECT_KEY 0x0e00 /* protection key */ #define RTC_STATUS 0x0f00 /* real time clock status */ /* * i/o structure used in rtc read/write system calls (syslocal 10,11) */ struct rtc { char sec1,sec10; char min1,min10; char hr1,hr10; char day1,day10; char mon1,mon10; char yr1,yr10; char wkday; };