2 * Registers for the SGS-Thomson M48T35 Timekeeper RAM chip
9 #define M48T35_RTC_CONTROL 0
10 #define M48T35_RTC_SECONDS 1
11 #define M48T35_RTC_MINUTES 2
12 #define M48T35_RTC_HOURS 3
13 #define M48T35_RTC_DAY 4
14 #define M48T35_RTC_DOM 5
15 #define M48T35_RTC_MONTH 6
16 #define M48T35_RTC_YEAR 7
18 #define M48T35_RTC_SET 0x80
19 #define M48T35_RTC_STOPPED 0x80
20 #define M48T35_RTC_READ 0x40
23 #define BCD_TO_BIN(x) ((x)=((x)&15) + ((x)>>4)*10)
27 #define BIN_TO_BCD(x) ((x)=(((x)/10)<<4) + (x)%10)