23
23
24
24
#define _BV (bit ) (1 << (bit))
25
25
26
- // RX8025T I2C Address
26
+ // RX8025T I2C Address
27
27
#define RX8025T_ADDR 0x32
28
28
29
- // RX8025T Register Addresses
29
+ // RX8025T Register Addresses
30
30
#define RX8025T_SECONDS 0x00
31
31
#define RX8025T_MINUTES 0x01
32
32
#define RX8025T_HOURS 0x02
44
44
#define RX8025T_RTC_STATUS 0x0E
45
45
#define RX8025T_RTC_CONTROL 0x0F
46
46
47
- // Extension register bits
47
+ // Extension register bits
48
48
#define TSEL0 0
49
49
#define TSEL1 1
50
50
#define FSEL0 2
53
53
#define USEL 5
54
54
#define WADA 6
55
55
56
- // Status register bits
56
+ // Status register bits
57
57
#define VDET 0
58
58
#define VLF 1
59
59
#define AF 3
60
60
#define TF 4
61
61
#define UF 5
62
62
63
- // Control register bits
63
+ // Control register bits
64
64
#define RESET 0
65
65
#define AIE 3
66
66
#define TIE 4
67
67
#define UIE 5
68
68
#define CSEL0 6
69
69
#define CSEL1 7
70
70
71
- // Time update interrupt function
71
+ // Time update interrupt function
72
72
#define INT_SECOND 0x00
73
73
#define INT_MINUTE 0x20
74
74
75
- // Time update interrupt
75
+ // Time update interrupt
76
76
#define INT_ON 0x20
77
77
#define INT_OFF 0x00
78
78
79
- // Temperature compensation interval
79
+ // Temperature compensation interval
80
80
#define INT_0_5_SEC 0x00
81
81
#define INT_2_SEC 0x40
82
82
#define INT_10_SEC 0x80
@@ -92,24 +92,24 @@ class RX8025T
92
92
public:
93
93
RX8025T ();
94
94
void init (void );
95
- static time_t get (void ); // must be static to work with setSyncProvider() in the Time library
95
+ static time_t get (void ); // Must be static to work with setSyncProvider() in the Time library
96
96
uint8_t set (time_t t);
97
97
static uint8_t read (tmElements_t &tm );
98
98
uint8_t write (tmElements_t &tm );
99
99
uint8_t writeRTC (uint8_t addr, uint8_t *values, uint8_t nBytes);
100
100
uint8_t writeRTC (uint8_t addr, uint8_t value);
101
101
uint8_t readRTC (uint8_t addr, uint8_t *values, uint8_t nBytes);
102
102
uint8_t readRTC (uint8_t addr);
103
- void tempCompensation (uint8_t option);
104
- void initFOUT (uint8_t option);
103
+ void tempCompensation (uint8_t option);
104
+ void initFOUT (uint8_t option);
105
105
void initTUI (uint8_t option);
106
106
void statusTUI (uint8_t status);
107
- bool checkTUI (void );
107
+ bool checkTUI (void );
108
108
109
109
private:
110
- uint8_t currentStateUIEbit;
111
- uint8_t wday2bin (uint8_t wday);
112
- static uint8_t bin2wday (uint8_t wday);
110
+ uint8_t currentStateUIEbit;
111
+ uint8_t wday2bin (uint8_t wday);
112
+ static uint8_t bin2wday (uint8_t wday);
113
113
uint8_t dec2bcd (uint8_t n);
114
114
static uint8_t bcd2dec (uint8_t n);
115
115
};
0 commit comments