Tiny Real-Time Clock/calendar with alarm function, battery switch-over, time stamp input, and I2C-bus
Dependencies: mbed
Diff: PCF85263AT.h
- Revision:
- 0:4f2e0e1e9a05
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PCF85263AT.h Wed Feb 04 06:13:31 2015 +0000 @@ -0,0 +1,64 @@ +#define PCF85263AT_ADDR 0xA2 + +#define Seconds_100th 0x00 +#define Seconds 0x01 +#define Minutes 0x02 +#define Hours 0x03 +#define Days 0x04 +#define Weekdays 0x05 +#define Months 0x06 +#define Years 0x07 +#define Second_alm1 0x08 +#define Minute_alm1 0x09 +#define Hour_alm1 0x0a +#define Day_alm1 0x0b +#define Month_alm1 0x0c +#define Minute_alm2 0x0d +#define Hour_alm2 0x0e +#define Weekday_alm2 0x0f +#define Alarm_enables 0x10 +#define TSR1_seconds 0x11 +#define TSR1_minutes 0x12 +#define TSR1_hours 0x13 +#define TSR1_days 0x14 +#define TSR1_months 0x15 +#define TSR1_years 0x16 +#define TSR2_seconds 0x17 +#define TSR2_minutes 0x18 +#define TSR2_hours 0x19 +#define TSR2_days 0x1a +#define TSR2_months 0x1b +#define TSR2_years 0x1c +#define TSR3_seconds 0x1d +#define TSR3_minutes 0x1e +#define TSR3_hours 0x1f +#define TSR3_days 0x20 +#define TSR3_months 0x21 +#define TSR3_years 0x22 +#define TSR_mode 0x23 + +#define Offset 0x24 +#define Oscillator 0x25 +#define Battery_switch 0x26 +#define Pin_IO 0x27 +#define Function 0x28 +#define INTA_enable 0x29 +#define INTB_enable 0x2a +#define Flags 0x2b +#define RAM_byte 0x2c +#define Watchdog 0x2d +#define Stop_enable 0x2e +#define Resets 0x2f + +typedef struct +{ + char s100th; // 0.01秒 + char s; // 秒 + char m; // 分 + char h; // 時間 + char d; // 日 + char wd; // 曜日 + char mm; // 月 + short y; // 年 +} dt_dat, *pdt_dat; +