ds3234_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 SKF AB
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef DS3234_REGS_H
20 #define DS3234_REGS_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 enum {
31  DS323X_REG_TIME_SECONDS = (0x00),
32  DS323X_REG_TIME_MINUTES = (0x01),
33  DS323X_REG_TIME_HOURS = (0x02),
34  DS323X_REG_TIME_WEEKDAY = (0x03),
35  DS323X_REG_TIME_DATE = (0x04),
36  DS323X_REG_TIME_MONTH = (0x05),
37  DS323X_REG_TIME_YEAR = (0x06),
38  DS323X_REG_ALARM1_SECONDS = (0x07),
39  DS323X_REG_ALARM1_MINUTES = (0x08),
40  DS323X_REG_ALARM1_HOURS = (0x09),
41  DS323X_REG_ALARM1_DAYDATE = (0x0A),
42  DS323X_REG_ALARM2_MINUTES = (0x0B),
43  DS323X_REG_ALARM2_HOURS = (0x0C),
44  DS323X_REG_ALARM2_DAYDATE = (0x0D),
45  DS323X_REG_CONTROL = (0x0E),
46  DS323X_REG_CONTROL_STATUS = (0x0F),
47  DS323X_REG_XTAL_AGING = (0x10),
48  DS323X_REG_TEMP_MSB = (0x11),
49  DS323X_REG_TEMP_LSB = (0x12),
50  DS323X_REG_TEMP_DISABLE = (0x13),
51  DS323X_REG_SRAM_ADDR = (0x18),
52  DS323X_REG_SRAM_DATA = (0x19),
53 };
60 #define DS323X_REG_CONTROL_EOSC_MASK (0x80)
61 #define DS323X_REG_CONTROL_BBSQW_MASK (0x40)
62 #define DS323X_REG_CONTROL_CONV_MASK (0x20)
63 #define DS323X_REG_CONTROL_RS2_MASK (0x10)
64 #define DS323X_REG_CONTROL_RS1_MASK (0x08)
65 #define DS323X_REG_CONTROL_INTCN_MASK (0x04)
66 #define DS323X_REG_CONTROL_A2IE_MASK (0x02)
67 #define DS323X_REG_CONTROL_A1IE_MASK (0x01)
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* DS3234_REGS_H */
75