Modestus Moon OS
R4
CS 450 project
|
Go to the source code of this file.
Macros | |
#define | RTC_INDEX_REG 0x70 |
#define | RTC_DATA_REG 0x71 |
#define | SECONDS_INDEX 0x00 |
#define | MINUTES_INDEX 0x02 |
#define | HOURS_INDEX 0x04 |
#define | DAY_OF_MONTH_INDEX 0x07 |
#define | MONTHS_INDEX 0x08 |
#define | YEAR_INDEX 0x09 |
Functions | |
void | get_time (int *hours, int *minutes, int *seconds) |
get_time this function will retrieve the system time and place it in three pointers. Military time More... | |
void | set_time (int hours, int minutes, int seconds) |
set_time sets the RTC time. Military time More... | |
void | get_date (int *day, int *month, int *year) |
get_date this function will retrieve the system date and place in three pointers More... | |
void | set_date (int day, int month, int year) |
set_date sets the RTC Date More... | |
#define DAY_OF_MONTH_INDEX 0x07 |
Definition at line 13 of file rtc.h.
Referenced by get_date(), and set_date().
#define HOURS_INDEX 0x04 |
Definition at line 12 of file rtc.h.
Referenced by get_time(), and set_time().
#define MINUTES_INDEX 0x02 |
Definition at line 11 of file rtc.h.
Referenced by get_time(), and set_time().
#define MONTHS_INDEX 0x08 |
Definition at line 14 of file rtc.h.
Referenced by get_date(), and set_date().
#define RTC_DATA_REG 0x71 |
Definition at line 8 of file rtc.h.
Referenced by set_date(), and set_time().
#define RTC_INDEX_REG 0x70 |
Definition at line 7 of file rtc.h.
Referenced by get_date(), get_time(), set_date(), and set_time().
#define SECONDS_INDEX 0x00 |
Definition at line 10 of file rtc.h.
Referenced by get_time(), and set_time().
#define YEAR_INDEX 0x09 |
Definition at line 15 of file rtc.h.
Referenced by get_date(), and set_date().
void get_date | ( | int * | day, |
int * | month, | ||
int * | year | ||
) |
get_date this function will retrieve the system date and place in three pointers
day | pointer to int where the current day will be stored, UTC Time zone |
months | pointer to int where the current month will be stored, UTC Time zone |
year | pointer to int where the current year will be stored, UTC Time zone |
Definition at line 56 of file rtc.c.
References DAY_OF_MONTH_INDEX, inb, MONTHS_INDEX, outb, RTC_INDEX_REG, and YEAR_INDEX.
Referenced by getDate().
void get_time | ( | int * | hours, |
int * | minutes, | ||
int * | seconds | ||
) |
get_time this function will retrieve the system time and place it in three pointers. Military time
hours | pointer to int where the current hours will be stored, in UTC timezone |
minutes | pointer to int where the current minutes will be stored, in UTC timezone |
seconds | pointer to int where the current seconds will be stored, in UTC timezone |
get_time this function will retrieve the system time and place it in three pointers. Military time
hours | pointer to int where the current hours will be stored, in UTC timezone |
minutes | pointer to int where the current minutes will be stored, in UTC timezone |
seconds | pointer to int where the current seconds will be stored, in UTC timezone |
Definition at line 10 of file rtc.c.
References HOURS_INDEX, inb, MINUTES_INDEX, outb, RTC_INDEX_REG, and SECONDS_INDEX.
Referenced by getTime().
void set_date | ( | int | day, |
int | month, | ||
int | year | ||
) |
set_date sets the RTC Date
day | the day to set the clock to, must be valid for the month. UTC Time zone |
month | the month to set the clock to, must be between 1 and 12. UTC Time zone |
year | the year to set the clock to, must be less than 100. UTC Time zone |
Definition at line 79 of file rtc.c.
References cli, DAY_OF_MONTH_INDEX, MONTHS_INDEX, outb, RTC_DATA_REG, RTC_INDEX_REG, sti, and YEAR_INDEX.
Referenced by setDate().
void set_time | ( | int | hours, |
int | minutes, | ||
int | seconds | ||
) |
set_time sets the RTC time. Military time
hours | the hours to set the clock to, must be less than 24. In UTC Time zone |
minutes | the minutes to set the clock to, must be less than 60. In UTC Time zone |
seconds | the seconds to set the clock to, must be less than 60. In UTC Time zone |
set_time sets the RTC time. Military time
hours | the hours to set the clock to, must be less than 24. In UTC Time zone |
minutes | the minutes to set the clock to, must be less than 60. In UTC Time zone |
seconds | the seconds to set the clock to, must be less than 60. In UTC Time zone |
Definition at line 33 of file rtc.c.
References cli, HOURS_INDEX, MINUTES_INDEX, outb, RTC_DATA_REG, RTC_INDEX_REG, SECONDS_INDEX, and sti.
Referenced by setTime().