#ifndef RTC_H
#define RTC_H

void initRTC(void);

typedef struct
{
	unsigned int 	bcdyear;	// BCD year from 2000
	unsigned char	bcdmonth;	// BCD 1- 12
	unsigned char	bcdday;		// BCD 1- 31
	unsigned char	bcdwday;	// BCD weekday
	unsigned char	bcdhours;	// BCD 0-23
	unsigned char	bcdminutes;	// BCD 0-59
	unsigned char 	bcdseconds;	// BCD 0-59
} TIMET;

TIMET getRTCTime(void);
void  setRTCTime(TIMET);
unsigned long BCD2Hex(unsigned int);

#endif
