2021-12-29 15:15:18 +00:00
|
|
|
#pragma once
|
2023-02-03 20:47:05 +00:00
|
|
|
#include "drivers/io/io.h"
|
2021-12-29 15:15:18 +00:00
|
|
|
#define CURRENT_YEAR 2021
|
|
|
|
|
|
|
|
|
|
|
|
extern int century_register;
|
|
|
|
extern unsigned char second;
|
|
|
|
extern unsigned char minute;
|
|
|
|
extern unsigned char hour;
|
|
|
|
extern unsigned char day;
|
|
|
|
extern unsigned char month;
|
|
|
|
extern unsigned int year;
|
2021-05-18 20:11:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
cmos_address = 0x70,
|
|
|
|
cmos_data = 0x71
|
|
|
|
};
|
|
|
|
|
2021-12-29 15:15:18 +00:00
|
|
|
int get_update_in_progress_flag();
|
|
|
|
unsigned char get_RTC_register();
|
|
|
|
void read_rtc();
|
|
|
|
void delay(int t);
|