AceTimeClock  1.3.0
Clock classes for Arduino that can synchronize from an NTP server or an RTC chip
Public Member Functions | List of all members
ace_time::hw::DS3231< T_WIREI > Class Template Reference

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.
 

Detailed Description

template<typename T_WIREI>
class ace_time::hw::DS3231< T_WIREI >

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.

Template Parameters
T_WIREItype of the AceWire implementation to communicate over I2C

Definition at line 32 of file DS3231.h.


The documentation for this class was generated from the following file: