Training courses
Kernel and Embedded Linux
Bootlin training courses
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
/* $NetBSD: pcf8583reg.h,v 1.3 2013/08/07 19:38:45 soren Exp $ */ /* * Ben Harris, 2000 * * This file is in the public domain */ /* * Philips PCF8583 RTC registers */ /* We only have clock mode registers here */ #ifndef _PCF8583REG_H #define _PCF8583REG_H /* * PCF8583 RTC I2C address: * * 101 0000 */ #define PCF8583_ADDRMASK 0x3ff #define PCF8583_ADDR 0x50 #define PCF8583_REG_CSR 0x00 #define PCF8583_REG_CENTI 0x01 #define PCF8583_REG_SEC 0x02 #define PCF8583_REG_MIN 0x03 #define PCF8583_REG_HOUR 0x04 #define PCF8583_REG_YEARDATE 0x05 #define PCF8583_REG_WKDYMON 0x06 #define PCF8583_REG_TIMER 0x07 #define PCF8583_REG_ALMCTL 0x08 #define PCF8583_REG_ALMCENTI 0x09 #define PCF8583_REG_ALMSEC 0x0a #define PCF8583_REG_ALMMIN 0x0b #define PCF8583_REG_ALMHOUR 0x0c #define PCF8583_REG_ALMDAY 0x0d #define PCF8583_REG_ALMMON 0x0e #define PCF8583_REG_ALMTIMER 0x0f #define PCF8583_NVRAM_START 0x10 #define PCF8583_NVRAM_SIZE 240 #define PCF8583_CSR_TIMER 0x01 #define PCF8583_CSR_SECTICK 0x01 #define PCF8583_CSR_ALARM 0x02 #define PCF8583_CSR_MINTICK 0x02 #define PCF8583_CSR_ALARMENABLE 0x04 #define PCF8583_CSR_MASK 0x08 #define PCF8583_CSR_FN_MASK 0x30 #define PCF8583_CSR_FN_32768HZ 0x00 #define PCF8583_CSR_FN_50HZ 0x10 #define PCF8583_CSR_FN_EVENT 0x20 #define PCF8583_CSR_FN_TEST 0x30 #define PCF8583_CSR_HOLD 0x40 #define PCF8583_CSR_STOP 0x80 #define PCF8583_HOUR_MASK 0x3f #define PCF8583_HOUR_PM 0x40 #define PCF8583_HOUR_12H 0x80 #define PCF8583_DATE_MASK 0x3f #define PCF8583_YEAR_MASK 0xc0 #define PCF8583_YEAR_SHIFT 6 #define PCF8583_MON_MASK 0x1f #define PCF8583_WKDY_MASK 0xe0 #define PCF8583_WKDY_SHIFT 5 #define PCF8583_ALMCTL_TIMER_MASK 0x07 #define PCF8583_ALMCTL_TIMER_OFF 0x00 #define PCF8583_ALMCTL_TIMER_CENTI 0x01 #define PCF8583_ALMCTL_TIMER_SEC 0x02 #define PCF8583_ALMCTL_TIMER_MIN 0x03 #define PCF8583_ALMCTL_TIMER_HOUR 0x04 #define PCF8583_ALMCTL_TIMER_DAY 0x05 #define PCF8583_ALMCTL_TIMER_TEST 0x07 #define PCF8583_ALMCTL_TIMERINT 0x08 #define PCF8583_ALMCTL_CLKALM_MASK 0x30 #define PCF8583_ALMCTL_CLKALM_NONE 0x00 #define PCF8583_ALMCTL_CLKALM_DAILY 0x10 #define PCF8583_ALMCTL_CLKALM_WKDY 0x20 #define PCF8583_ALMCTL_CLKALM_DATED 0x30 #define PCF8583_ALMCTL_TIMERALM 0x40 #define PCF8583_ALMCTL_ALMINT 0x80 #endif /* _PCF8583REG_H */