|
Modestus Moon OS
R4
CS 450 project
|

Go to the source code of this file.
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 More... | |
| void | set_time (int hours, int minutes, int seconds) |
| set_time sets the RTC 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... | |
| 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
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
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().