2012-06-23 12:16:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __RTC_H__
|
|
|
|
#define __RTC_H__
|
|
|
|
|
|
|
|
|
|
|
|
struct rtc
|
|
|
|
{
|
|
|
|
int batt;
|
|
|
|
int sel;
|
|
|
|
int latch;
|
|
|
|
int d, h, m, s, t;
|
|
|
|
int stop, carry;
|
|
|
|
byte regs[8];
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct rtc rtc;
|
|
|
|
|
2012-06-23 14:38:19 +00:00
|
|
|
#include "defs.h"
|
2012-06-23 12:16:37 +00:00
|
|
|
|
2012-06-23 14:38:19 +00:00
|
|
|
void rtc_latch(byte b);
|
|
|
|
void rtc_write(byte b);
|
|
|
|
void rtc_tick();
|
2012-06-23 12:16:37 +00:00
|
|
|
|
2012-06-23 14:38:19 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
void rtc_save_internal(FILE *f);
|
|
|
|
void rtc_load_internal(FILE *f);
|
2012-06-23 12:16:37 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|