/*
 * RTC.h
 *
 *  Created on: Dec 23, 2011
 *      Author: RomanM
 */

#ifndef RTC_H_
#define RTC_H_

enum {
	Sunday = 0,
	Monday,
	Tuesday,
	Wednesday,
	Thursday,
	Friday,
	Saturday
};

extern char *dayNames[];

void RTC_Init(void);
void RTC_InterruptHandler(void);

uint16_t RTC_GetYear(void);
uint8_t RTC_GetMonth(void);
uint8_t RTC_GetDay(void);
uint8_t RTC_GetHour(void);
uint8_t RTC_GetMinute(void);
uint8_t RTC_GetSecond(void);
uint8_t RTC_GetDayOfWeek(void);

void RTC_SetYear(uint16_t year);
void RTC_SetMonth(uint8_t month);
void RTC_SetDay(uint8_t day);
void RTC_SetHour(uint8_t hour);
void RTC_SetMinute(uint8_t minute);
void RTC_SetSecond(uint8_t second);

#endif /* RTC_H_ */
