iPXE
Macros | Functions
rtc.h File Reference

CMOS Real-Time Clock (RTC) More...

#include <pic8259.h>

Go to the source code of this file.

Macros

#define RTC_IRQ   8
 RTC IRQ. More...
 
#define RTC_INT   IRQ_INT ( RTC_IRQ )
 RTC interrupt vector. More...
 
#define CMOS_ADDRESS   0x70
 CMOS/RTC address (and NMI) register. More...
 
#define CMOS_DISABLE_NMI   0x80
 NMI disable bit. More...
 
#define CMOS_DATA   0x71
 CMOS/RTC data register. More...
 
#define RTC_SEC   0x00
 RTC seconds. More...
 
#define RTC_MIN   0x02
 RTC minutes. More...
 
#define RTC_HOUR   0x04
 RTC hours. More...
 
#define RTC_WDAY   0x06
 RTC weekday. More...
 
#define RTC_MDAY   0x07
 RTC day of month. More...
 
#define RTC_MON   0x08
 RTC month. More...
 
#define RTC_YEAR   0x09
 RTC year. More...
 
#define RTC_STATUS_A   0x0a
 RTC status register A. More...
 
#define RTC_STATUS_A_UPDATE_IN_PROGRESS   0x80
 RTC update in progress bit. More...
 
#define RTC_STATUS_B   0x0b
 RTC status register B. More...
 
#define RTC_STATUS_B_24_HOUR   0x02
 RTC 24 hour format bit. More...
 
#define RTC_STATUS_B_BINARY   0x04
 RTC binary mode bit. More...
 
#define RTC_STATUS_B_PIE   0x40
 RTC Periodic Interrupt Enabled bit. More...
 
#define RTC_STATUS_C   0x0c
 RTC status register C. More...
 
#define RTC_STATUS_D   0x0d
 RTC status register D. More...
 
#define CMOS_DEFAULT_ADDRESS   RTC_STATUS_D
 CMOS default address. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Detailed Description

CMOS Real-Time Clock (RTC)

The CMOS/RTC registers are documented (with varying degrees of accuracy and consistency) at

http://www.nondot.org/sabre/os/files/MiscHW/RealtimeClockFAQ.txt http://wiki.osdev.org/RTC http://wiki.osdev.org/CMOS

Definition in file rtc.h.

Macro Definition Documentation

◆ RTC_IRQ

#define RTC_IRQ   8

RTC IRQ.

Definition at line 21 of file rtc.h.

◆ RTC_INT

#define RTC_INT   IRQ_INT ( RTC_IRQ )

RTC interrupt vector.

Definition at line 24 of file rtc.h.

◆ CMOS_ADDRESS

#define CMOS_ADDRESS   0x70

CMOS/RTC address (and NMI) register.

Definition at line 27 of file rtc.h.

◆ CMOS_DISABLE_NMI

#define CMOS_DISABLE_NMI   0x80

NMI disable bit.

Definition at line 30 of file rtc.h.

◆ CMOS_DATA

#define CMOS_DATA   0x71

CMOS/RTC data register.

Definition at line 33 of file rtc.h.

◆ RTC_SEC

#define RTC_SEC   0x00

RTC seconds.

Definition at line 36 of file rtc.h.

◆ RTC_MIN

#define RTC_MIN   0x02

RTC minutes.

Definition at line 39 of file rtc.h.

◆ RTC_HOUR

#define RTC_HOUR   0x04

RTC hours.

Definition at line 42 of file rtc.h.

◆ RTC_WDAY

#define RTC_WDAY   0x06

RTC weekday.

Definition at line 45 of file rtc.h.

◆ RTC_MDAY

#define RTC_MDAY   0x07

RTC day of month.

Definition at line 48 of file rtc.h.

◆ RTC_MON

#define RTC_MON   0x08

RTC month.

Definition at line 51 of file rtc.h.

◆ RTC_YEAR

#define RTC_YEAR   0x09

RTC year.

Definition at line 54 of file rtc.h.

◆ RTC_STATUS_A

#define RTC_STATUS_A   0x0a

RTC status register A.

Definition at line 57 of file rtc.h.

◆ RTC_STATUS_A_UPDATE_IN_PROGRESS

#define RTC_STATUS_A_UPDATE_IN_PROGRESS   0x80

RTC update in progress bit.

Definition at line 60 of file rtc.h.

◆ RTC_STATUS_B

#define RTC_STATUS_B   0x0b

RTC status register B.

Definition at line 63 of file rtc.h.

◆ RTC_STATUS_B_24_HOUR

#define RTC_STATUS_B_24_HOUR   0x02

RTC 24 hour format bit.

Definition at line 66 of file rtc.h.

◆ RTC_STATUS_B_BINARY

#define RTC_STATUS_B_BINARY   0x04

RTC binary mode bit.

Definition at line 69 of file rtc.h.

◆ RTC_STATUS_B_PIE

#define RTC_STATUS_B_PIE   0x40

RTC Periodic Interrupt Enabled bit.

Definition at line 72 of file rtc.h.

◆ RTC_STATUS_C

#define RTC_STATUS_C   0x0c

RTC status register C.

Definition at line 75 of file rtc.h.

◆ RTC_STATUS_D

#define RTC_STATUS_D   0x0d

RTC status register D.

Definition at line 78 of file rtc.h.

◆ CMOS_DEFAULT_ADDRESS

#define CMOS_DEFAULT_ADDRESS   RTC_STATUS_D

CMOS default address.

Definition at line 81 of file rtc.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )