|
| RTC () |
| Constructs a new realtime clock handler. More...
|
|
virtual bool | hasUpdates () |
| Returns true if the realtime clock has updated since the last call to this function. More...
|
|
virtual void | readTime (RTCTime *value) |
| Reads the current time from the realtime clock into value. More...
|
|
virtual void | readDate (RTCDate *value) |
| Reads the current date from the realtime clock into value. More...
|
|
virtual void | writeTime (const RTCTime *value) |
| Updates the time in the realtime clock to match value. More...
|
|
virtual void | writeDate (const RTCDate *value) |
| Updates the date in the realtime clock to match value. More...
|
|
virtual void | readAlarm (uint8_t alarmNum, RTCAlarm *value) |
| Reads the details of the alarm with index alarmNum into value. More...
|
|
virtual void | writeAlarm (uint8_t alarmNum, const RTCAlarm *value) |
| Updates the details of the alarm with index alarmNum from value. More...
|
|
virtual int | byteCount () const |
| Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms. More...
|
|
virtual uint8_t | readByte (uint8_t offset) |
| Reads the byte at offset within the realtime clock's non-volatile memory. More...
|
|
virtual void | writeByte (uint8_t offset, uint8_t value) |
| Writes value to offset within the realtime clock's non-volatile memory. More...
|
|
virtual int | readTemperature () |
| Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius. More...
|
|
Base class for realtime clock handlers.
This class simplifies the process of reading and writing the time and date information in a realtime clock chip. The class also provides support for reading and writing information about alarms and other clock settings.
It is intended that the application will instantiate a subclass of this class to handle the specific realtime clock chip in the system. The default implementation in RTC simulates a clock based on the value of millis(), with alarms and clock settings stored in main memory.
Because the common DS1307 and DS3232 realtime clock chips use a 2-digit year, this class is also limited to dates between 2000 and 2099 inclusive.
- See Also
- RTCTime, RTCDate, RTCAlarm, DS1307RTC, DS3232RTC
Definition at line 52 of file RTC.h.
Returns true if the realtime clock has updated since the last call to this function.
The default implementation returns true, indicating that an update is always available to be read.
Reimplemented in DS3231RTC, DS1307RTC, and DS3232RTC.
Definition at line 134 of file RTC.cpp.
void RTC::readAlarm |
( |
uint8_t |
alarmNum, |
|
|
RTCAlarm * |
value |
|
) |
| |
|
virtual |
Reads the details of the alarm with index alarmNum into value.
The alarmNum parameter must be between 0 and ALARM_COUNT - 1.
Alarm details are stored at the end of the realtime clock's non-volatile memory.
- See Also
- writeAlarm(), alarmCount()
Reimplemented in DS3231RTC, DS1307RTC, and DS3232RTC.
Definition at line 209 of file RTC.cpp.
void RTC::writeAlarm |
( |
uint8_t |
alarmNum, |
|
|
const RTCAlarm * |
value |
|
) |
| |
|
virtual |
Updates the details of the alarm with index alarmNum from value.
The alarmNum parameter must be between 0 and ALARM_COUNT - 1.
Alarm details are stored at the end of the realtime clock's non-volatile memory.
- See Also
- readAlarm(), alarmCount()
Reimplemented in DS3231RTC, DS1307RTC, and DS3232RTC.
Definition at line 224 of file RTC.cpp.