Modestus Moon OS  R4
CS 450 project
rtc.h
Go to the documentation of this file.
1 #ifndef RTC_H
2 #define RTC_H
3 
4 #include <core/io.h>
5 #include <system.h>
6 
7 #define RTC_INDEX_REG 0x70
8 #define RTC_DATA_REG 0x71
9 
10 #define SECONDS_INDEX 0x00
11 #define MINUTES_INDEX 0x02
12 #define HOURS_INDEX 0x04
13 #define DAY_OF_MONTH_INDEX 0x07
14 #define MONTHS_INDEX 0x08
15 #define YEAR_INDEX 0x09
16 
17 
25 void get_time(int *hours, int *minutes, int *seconds);
26 
34 void set_time(int hours, int minutes, int seconds);
35 
36 
37 
45 void get_date(int *day, int *month, int *year);
46 
54 void set_date(int day, int month, int year);
55 
56 #endif // RTC_H
void set_time(int hours, int minutes, int seconds)
set_time sets the RTC time. Military time
Definition: rtc.c:33
void set_date(int day, int month, int year)
set_date sets the RTC Date
Definition: rtc.c:79
void get_date(int *day, int *month, int *year)
get_date this function will retrieve the system date and place in three pointers
Definition: rtc.c:56
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
Definition: rtc.c:10