AceTime  0.3
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
DS3231.h
1 #ifndef ACE_TIME_HW_DS3231_H
2 #define ACE_TIME_HW_DS3231_H
3 
4 #if defined(ARDUINO)
5 
6 #include <stdint.h>
7 
8 namespace ace_time {
9 namespace hw {
10 
11 class HardwareDateTime;
12 class HardwareTemperature;
13 
24 class DS3231 {
25  public:
27  explicit DS3231() {}
28 
30  void readDateTime(HardwareDateTime* dateTime) const;
31 
33  void setDateTime(const HardwareDateTime& dateTime) const;
34 
36  void readTemperature(HardwareTemperature* temperature) const;
37 
38  private:
39  static const uint8_t kAddress = 0x68;
40 };
41 
42 }
43 }
44 
45 #endif
46 
47 #endif