83 virtual uint8_t
readByte(uint8_t offset);
84 virtual void writeByte(uint8_t offset, uint8_t value);
93 static const uint8_t
WRAP = 0x0002;
102 unsigned long midnight;
uint8_t month
Month of the year (1-12)
virtual void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
RTC()
Constructs a new realtime clock handler.
static DayOfWeek dayOfWeek(const RTCDate *date)
Returns the day of the week corresponding to date.
uint8_t minute
Minute within the hour (0-59)
virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
virtual void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
uint8_t day
Day of the month for the alarm if not zero.
static const uint8_t DECREMENT
Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
DayOfWeek
Day of the week corresponding to a date.
virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
static const uint8_t ALARM_COUNT
Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
virtual void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
virtual int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
uint8_t hour
Hour of the day for the alarm (0-23).
static const int NO_TEMPERATURE
Value that is returned from readTemperature() if the realtime clock chip cannot determine the tempera...
uint8_t flags
Additional flags for the alarm.
uint8_t dow
Day of the week for the alarm if not zero.
Stores date information from a realtime clock chip.
unsigned int year
Year (4-digit)
virtual int readTemperature()
Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius...
virtual void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
static void adjustYears(RTCDate *date, uint8_t flags)
Adjusts date up or down one year according to flags.
uint8_t minute
Minute of the hour for the alarm (0-59).
static const uint8_t INCREMENT
Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
virtual uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
static void adjustDays(RTCDate *date, uint8_t flags)
Adjusts date up or down one day according to flags.
uint8_t second
Second of the minute for the alarm (0-59).
Stores time information from a realtime clock chip.
Stores alarm information from a realtime clock chip.
static void adjustMonths(RTCDate *date, uint8_t flags)
Adjusts date up or down one month according to flags.
uint8_t hour
Hour of the day (0-23)
uint8_t day
Day of the month (1-31)
uint8_t second
Second within the minute (0-59)
virtual bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
virtual void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Base class for realtime clock handlers.
static const uint8_t WRAP
Wrap around to the beginning of the current month/year rather than advance to the next one...