AceTimeClock
1.3.0
Clock classes for Arduino that can synchronize from an NTP server or an RTC chip
|
New version of the DS3231 class templatized so that any of the AceWire classes can be used to access the I2C bus. More...
#include <DS3231.h>
Public Member Functions | |
DS3231 (const T_WIREI &wireInterface) | |
Constructor. | |
void | readDateTime (HardwareDateTime *dateTime) const |
Read the time into the HardwareDateTime object. | |
void | setDateTime (const HardwareDateTime &dateTime) const |
Set the DS3231 with the HardwareDateTime values. | |
void | readTemperature (HardwareTemperature *temperature) const |
Read the temperature into the HardwareTemperature object. | |
New version of the DS3231 class templatized so that any of the AceWire classes can be used to access the I2C bus.
The previous version was hardcoded to use the Wire object from <Wire.h>. Using AceWire allows different software and hardware I2C libraries to be selected at compile time.
Making this a templatized class instead of using a virtual interface saves about 400 bytes of flash on AVR processors.
T_WIREI | type of the AceWire implementation to communicate over I2C |