From 61e698af3ed8f50b41000ed98ae126204dd000df Mon Sep 17 00:00:00 2001 From: Doxygen CI Date: Tue, 7 Dec 2021 14:54:48 +0000 Subject: [PATCH] Deploy docs to GitHub Pages from commit b4791ebcaa Commit: b4791ebcaacee207e48987ac77ae562d6d85af59 GitHub Actions run: 1549916994 --- html/_r_t_clib_8h_source.html | 10 ++-- html/class_date_time-members.html | 10 ++-- html/class_date_time.html | 66 ++++++++++++------------- html/class_r_t_c___d_s1307-members.html | 2 +- html/class_r_t_c___d_s1307.html | 12 ++--- html/class_time_span-members.html | 4 +- html/class_time_span.html | 24 ++++----- html/functions.html | 12 ++--- html/functions_func.html | 12 ++--- html/search/all_10.js | 4 +- html/search/all_12.js | 2 +- html/search/all_c.js | 4 +- html/search/functions_10.js | 2 +- html/search/functions_b.js | 4 +- html/search/functions_e.js | 4 +- 15 files changed, 86 insertions(+), 86 deletions(-) diff --git a/html/_r_t_clib_8h_source.html b/html/_r_t_clib_8h_source.html index e5f633c..67e9227 100644 --- a/html/_r_t_clib_8h_source.html +++ b/html/_r_t_clib_8h_source.html @@ -66,14 +66,14 @@ $(function() {
RTClib.h
-Go to the documentation of this file.
1 /**************************************************************************/
20 /**************************************************************************/
21 
22 #ifndef _RTCLIB_H_
23 #define _RTCLIB_H_
24 
25 #include <Adafruit_I2CDevice.h>
26 #include <Arduino.h>
27 
28 class TimeSpan;
29 
31 #define SECONDS_PER_DAY 86400L
32 #define SECONDS_FROM_1970_TO_2000 \
33  946684800
34 
35 
37  DS1307_OFF = 0x00, // Low
38  DS1307_ON = 0x80, // High
39  DS1307_SquareWave1HZ = 0x10, // 1Hz square wave
40  DS1307_SquareWave4kHz = 0x11, // 4kHz square wave
41  DS1307_SquareWave8kHz = 0x12, // 8kHz square wave
42  DS1307_SquareWave32kHz = 0x13 // 32kHz square wave
43 };
44 
47  DS3231_OFF = 0x1C,
52 };
53 
59  DS3231_A1_Hour = 0x08,
61  DS3231_A1_Date = 0x00,
63  DS3231_A1_Day = 0x10
65 };
76 };
87 };
88 
98 };
99 
110 };
111 
116 };
117 
125 };
126 
127 /**************************************************************************/
142 /**************************************************************************/
143 class DateTime {
144 public:
145  DateTime(uint32_t t = SECONDS_FROM_1970_TO_2000);
146  DateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour = 0,
147  uint8_t min = 0, uint8_t sec = 0);
148  DateTime(const DateTime &copy);
149  DateTime(const char *date, const char *time);
150  DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
151  DateTime(const char *iso8601date);
152  bool isValid() const;
153  char *toString(char *buffer);
154 
159  uint16_t year() const { return 2000U + yOff; }
164  uint8_t month() const { return m; }
169  uint8_t day() const { return d; }
174  uint8_t hour() const { return hh; }
175 
176  uint8_t twelveHour() const;
181  uint8_t isPM() const { return hh >= 12; }
186  uint8_t minute() const { return mm; }
191  uint8_t second() const { return ss; }
192 
193  uint8_t dayOfTheWeek() const;
194 
195  /* 32-bit times as seconds since 2000-01-01. */
196  uint32_t secondstime() const;
197 
198  /* 32-bit times as seconds since 1970-01-01. */
199  uint32_t unixtime(void) const;
200 
209  };
210  String timestamp(timestampOpt opt = TIMESTAMP_FULL);
211 
212  DateTime operator+(const TimeSpan &span);
213  DateTime operator-(const TimeSpan &span);
214  TimeSpan operator-(const DateTime &right);
215  bool operator<(const DateTime &right) const;
216 
226  bool operator>(const DateTime &right) const { return right < *this; }
227 
237  bool operator<=(const DateTime &right) const { return !(*this > right); }
238 
248  bool operator>=(const DateTime &right) const { return !(*this < right); }
249  bool operator==(const DateTime &right) const;
250 
259  bool operator!=(const DateTime &right) const { return !(*this == right); }
260 
261 protected:
262  uint8_t yOff;
263  uint8_t m;
264  uint8_t d;
265  uint8_t hh;
266  uint8_t mm;
267  uint8_t ss;
268 };
269 
270 /**************************************************************************/
274 /**************************************************************************/
275 class TimeSpan {
276 public:
277  TimeSpan(int32_t seconds = 0);
278  TimeSpan(int16_t days, int8_t hours, int8_t minutes, int8_t seconds);
279  TimeSpan(const TimeSpan &copy);
280 
286  int16_t days() const { return _seconds / 86400L; }
293  int8_t hours() const { return _seconds / 3600 % 24; }
300  int8_t minutes() const { return _seconds / 60 % 60; }
307  int8_t seconds() const { return _seconds % 60; }
312  int32_t totalseconds() const { return _seconds; }
313 
314  TimeSpan operator+(const TimeSpan &right);
315  TimeSpan operator-(const TimeSpan &right);
316 
317 protected:
318  int32_t _seconds;
319 };
320 
321 /**************************************************************************/
325 /**************************************************************************/
326 class RTC_I2C {
327 protected:
334  static uint8_t bcd2bin(uint8_t val) { return val - 6 * (val >> 4); }
340  static uint8_t bin2bcd(uint8_t val) { return val + 6 * (val / 10); }
341  Adafruit_I2CDevice *i2c_dev = NULL;
342  uint8_t read_register(uint8_t reg);
343  void write_register(uint8_t reg, uint8_t val);
344 };
345 
346 /**************************************************************************/
350 /**************************************************************************/
352 public:
353  boolean begin(TwoWire *wireInstance = &Wire);
354  void adjust(const DateTime &dt);
355  uint8_t isrunning(void);
356  DateTime now();
357  Ds1307SqwPinMode readSqwPinMode();
358  void writeSqwPinMode(Ds1307SqwPinMode mode);
359  uint8_t readnvram(uint8_t address);
360  void readnvram(uint8_t *buf, uint8_t size, uint8_t address);
361  void writenvram(uint8_t address, uint8_t data);
362  void writenvram(uint8_t address, uint8_t *buf, uint8_t size);
363 };
364 
365 /**************************************************************************/
369 /**************************************************************************/
371 public:
372  boolean begin(TwoWire *wireInstance = &Wire);
373  void adjust(const DateTime &dt);
374  bool lostPower(void);
375  DateTime now();
376  Ds3231SqwPinMode readSqwPinMode();
377  void writeSqwPinMode(Ds3231SqwPinMode mode);
378  bool setAlarm1(const DateTime &dt, Ds3231Alarm1Mode alarm_mode);
379  bool setAlarm2(const DateTime &dt, Ds3231Alarm2Mode alarm_mode);
380  void disableAlarm(uint8_t alarm_num);
381  void clearAlarm(uint8_t alarm_num);
382  bool alarmFired(uint8_t alarm_num);
383  void enable32K(void);
384  void disable32K(void);
385  bool isEnabled32K(void);
386  float getTemperature(); // in Celsius degree
394  static uint8_t dowToDS3231(uint8_t d) { return d == 0 ? 7 : d; }
395 };
396 
397 /**************************************************************************/
401 /**************************************************************************/
403 public:
404  boolean begin(TwoWire *wireInstance = &Wire);
405  void adjust(const DateTime &dt);
406  boolean lostPower(void);
407  boolean initialized(void);
408  DateTime now();
409  void start(void);
410  void stop(void);
411  uint8_t isrunning();
412  Pcf8523SqwPinMode readSqwPinMode();
413  void writeSqwPinMode(Pcf8523SqwPinMode mode);
414  void enableSecondTimer(void);
415  void disableSecondTimer(void);
416  void enableCountdownTimer(PCF8523TimerClockFreq clkFreq, uint8_t numPeriods,
417  uint8_t lowPulseWidth);
418  void enableCountdownTimer(PCF8523TimerClockFreq clkFreq, uint8_t numPeriods);
419  void disableCountdownTimer(void);
420  void deconfigureAllTimers(void);
421  void calibrate(Pcf8523OffsetMode mode, int8_t offset);
422 };
423 
424 /**************************************************************************/
428 /**************************************************************************/
430 public:
431  boolean begin(TwoWire *wireInstance = &Wire);
432  boolean lostPower(void);
433  void adjust(const DateTime &dt);
434  DateTime now();
435  void start(void);
436  void stop(void);
437  uint8_t isrunning();
438  Pcf8563SqwPinMode readSqwPinMode();
439  void writeSqwPinMode(Pcf8563SqwPinMode mode);
440 };
441 
442 /**************************************************************************/
447 /**************************************************************************/
448 class RTC_Millis {
449 public:
454  void begin(const DateTime &dt) { adjust(dt); }
455  void adjust(const DateTime &dt);
456  DateTime now();
457 
458 protected:
466  uint32_t lastUnix;
474  uint32_t lastMillis;
475 };
476 
477 /**************************************************************************/
485 /**************************************************************************/
486 class RTC_Micros {
487 public:
492  void begin(const DateTime &dt) { adjust(dt); }
493  void adjust(const DateTime &dt);
494  void adjustDrift(int ppm);
495  DateTime now();
496 
497 protected:
502  uint32_t microsPerSecond = 1000000;
508  uint32_t lastUnix;
512  uint32_t lastMicros;
513 };
514 
515 #endif // _RTCLIB_H_
Definition: RTClib.h:47
+Go to the documentation of this file.
1 /**************************************************************************/
20 /**************************************************************************/
21 
22 #ifndef _RTCLIB_H_
23 #define _RTCLIB_H_
24 
25 #include <Adafruit_I2CDevice.h>
26 #include <Arduino.h>
27 
28 class TimeSpan;
29 
31 #define SECONDS_PER_DAY 86400L
32 #define SECONDS_FROM_1970_TO_2000 \
33  946684800
34 
35 
37  DS1307_OFF = 0x00, // Low
38  DS1307_ON = 0x80, // High
39  DS1307_SquareWave1HZ = 0x10, // 1Hz square wave
40  DS1307_SquareWave4kHz = 0x11, // 4kHz square wave
41  DS1307_SquareWave8kHz = 0x12, // 8kHz square wave
42  DS1307_SquareWave32kHz = 0x13 // 32kHz square wave
43 };
44 
47  DS3231_OFF = 0x1C,
52 };
53 
59  DS3231_A1_Hour = 0x08,
61  DS3231_A1_Date = 0x00,
63  DS3231_A1_Day = 0x10
65 };
76 };
87 };
88 
98 };
99 
110 };
111 
116 };
117 
125 };
126 
127 /**************************************************************************/
142 /**************************************************************************/
143 class DateTime {
144 public:
145  DateTime(uint32_t t = SECONDS_FROM_1970_TO_2000);
146  DateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour = 0,
147  uint8_t min = 0, uint8_t sec = 0);
148  DateTime(const DateTime &copy);
149  DateTime(const char *date, const char *time);
150  DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
151  DateTime(const char *iso8601date);
152  bool isValid() const;
153  char *toString(char *buffer) const;
154 
159  uint16_t year() const { return 2000U + yOff; }
164  uint8_t month() const { return m; }
169  uint8_t day() const { return d; }
174  uint8_t hour() const { return hh; }
175 
176  uint8_t twelveHour() const;
181  uint8_t isPM() const { return hh >= 12; }
186  uint8_t minute() const { return mm; }
191  uint8_t second() const { return ss; }
192 
193  uint8_t dayOfTheWeek() const;
194 
195  /* 32-bit times as seconds since 2000-01-01. */
196  uint32_t secondstime() const;
197 
198  /* 32-bit times as seconds since 1970-01-01. */
199  uint32_t unixtime(void) const;
200 
209  };
210  String timestamp(timestampOpt opt = TIMESTAMP_FULL) const;
211 
212  DateTime operator+(const TimeSpan &span) const;
213  DateTime operator-(const TimeSpan &span) const;
214  TimeSpan operator-(const DateTime &right) const;
215  bool operator<(const DateTime &right) const;
216 
226  bool operator>(const DateTime &right) const { return right < *this; }
227 
237  bool operator<=(const DateTime &right) const { return !(*this > right); }
238 
248  bool operator>=(const DateTime &right) const { return !(*this < right); }
249  bool operator==(const DateTime &right) const;
250 
259  bool operator!=(const DateTime &right) const { return !(*this == right); }
260 
261 protected:
262  uint8_t yOff;
263  uint8_t m;
264  uint8_t d;
265  uint8_t hh;
266  uint8_t mm;
267  uint8_t ss;
268 };
269 
270 /**************************************************************************/
274 /**************************************************************************/
275 class TimeSpan {
276 public:
277  TimeSpan(int32_t seconds = 0);
278  TimeSpan(int16_t days, int8_t hours, int8_t minutes, int8_t seconds);
279  TimeSpan(const TimeSpan &copy);
280 
286  int16_t days() const { return _seconds / 86400L; }
293  int8_t hours() const { return _seconds / 3600 % 24; }
300  int8_t minutes() const { return _seconds / 60 % 60; }
307  int8_t seconds() const { return _seconds % 60; }
312  int32_t totalseconds() const { return _seconds; }
313 
314  TimeSpan operator+(const TimeSpan &right) const;
315  TimeSpan operator-(const TimeSpan &right) const;
316 
317 protected:
318  int32_t _seconds;
319 };
320 
321 /**************************************************************************/
325 /**************************************************************************/
326 class RTC_I2C {
327 protected:
334  static uint8_t bcd2bin(uint8_t val) { return val - 6 * (val >> 4); }
340  static uint8_t bin2bcd(uint8_t val) { return val + 6 * (val / 10); }
341  Adafruit_I2CDevice *i2c_dev = NULL;
342  uint8_t read_register(uint8_t reg);
343  void write_register(uint8_t reg, uint8_t val);
344 };
345 
346 /**************************************************************************/
350 /**************************************************************************/
352 public:
353  boolean begin(TwoWire *wireInstance = &Wire);
354  void adjust(const DateTime &dt);
355  uint8_t isrunning(void);
356  DateTime now();
357  Ds1307SqwPinMode readSqwPinMode();
358  void writeSqwPinMode(Ds1307SqwPinMode mode);
359  uint8_t readnvram(uint8_t address);
360  void readnvram(uint8_t *buf, uint8_t size, uint8_t address);
361  void writenvram(uint8_t address, uint8_t data);
362  void writenvram(uint8_t address, const uint8_t *buf, uint8_t size);
363 };
364 
365 /**************************************************************************/
369 /**************************************************************************/
371 public:
372  boolean begin(TwoWire *wireInstance = &Wire);
373  void adjust(const DateTime &dt);
374  bool lostPower(void);
375  DateTime now();
376  Ds3231SqwPinMode readSqwPinMode();
377  void writeSqwPinMode(Ds3231SqwPinMode mode);
378  bool setAlarm1(const DateTime &dt, Ds3231Alarm1Mode alarm_mode);
379  bool setAlarm2(const DateTime &dt, Ds3231Alarm2Mode alarm_mode);
380  void disableAlarm(uint8_t alarm_num);
381  void clearAlarm(uint8_t alarm_num);
382  bool alarmFired(uint8_t alarm_num);
383  void enable32K(void);
384  void disable32K(void);
385  bool isEnabled32K(void);
386  float getTemperature(); // in Celsius degree
394  static uint8_t dowToDS3231(uint8_t d) { return d == 0 ? 7 : d; }
395 };
396 
397 /**************************************************************************/
401 /**************************************************************************/
403 public:
404  boolean begin(TwoWire *wireInstance = &Wire);
405  void adjust(const DateTime &dt);
406  boolean lostPower(void);
407  boolean initialized(void);
408  DateTime now();
409  void start(void);
410  void stop(void);
411  uint8_t isrunning();
412  Pcf8523SqwPinMode readSqwPinMode();
413  void writeSqwPinMode(Pcf8523SqwPinMode mode);
414  void enableSecondTimer(void);
415  void disableSecondTimer(void);
416  void enableCountdownTimer(PCF8523TimerClockFreq clkFreq, uint8_t numPeriods,
417  uint8_t lowPulseWidth);
418  void enableCountdownTimer(PCF8523TimerClockFreq clkFreq, uint8_t numPeriods);
419  void disableCountdownTimer(void);
420  void deconfigureAllTimers(void);
421  void calibrate(Pcf8523OffsetMode mode, int8_t offset);
422 };
423 
424 /**************************************************************************/
428 /**************************************************************************/
430 public:
431  boolean begin(TwoWire *wireInstance = &Wire);
432  boolean lostPower(void);
433  void adjust(const DateTime &dt);
434  DateTime now();
435  void start(void);
436  void stop(void);
437  uint8_t isrunning();
438  Pcf8563SqwPinMode readSqwPinMode();
439  void writeSqwPinMode(Pcf8563SqwPinMode mode);
440 };
441 
442 /**************************************************************************/
447 /**************************************************************************/
448 class RTC_Millis {
449 public:
454  void begin(const DateTime &dt) { adjust(dt); }
455  void adjust(const DateTime &dt);
456  DateTime now();
457 
458 protected:
466  uint32_t lastUnix;
474  uint32_t lastMillis;
475 };
476 
477 /**************************************************************************/
485 /**************************************************************************/
486 class RTC_Micros {
487 public:
492  void begin(const DateTime &dt) { adjust(dt); }
493  void adjust(const DateTime &dt);
494  void adjustDrift(int ppm);
495  DateTime now();
496 
497 protected:
502  uint32_t microsPerSecond = 1000000;
508  uint32_t lastUnix;
512  uint32_t lastMicros;
513 };
514 
515 #endif // _RTCLIB_H_
char * toString(char *buffer) const
Writes the DateTime as a string in a user-defined format.
Definition: RTClib.cpp:441
+
Definition: RTClib.h:47
DateTime(uint32_t t=SECONDS_FROM_1970_TO_2000)
Constructor from Unix time.
Definition: RTClib.cpp:161
bool operator<(const DateTime &right) const
Test if one DateTime is less (earlier) than another.
Definition: RTClib.cpp:647
bool operator<=(const DateTime &right) const
Test if one DateTime is less (earlier) than or equal to another.
Definition: RTClib.h:237
uint8_t ss
Seconds 0-59.
Definition: RTClib.h:267
Pcf8523OffsetMode
Definition: RTClib.h:113
Definition: RTClib.h:85
-
DateTime operator-(const TimeSpan &span)
Subtract a TimeSpan from the DateTime object.
Definition: RTClib.cpp:615
timestampOpt
Definition: RTClib.h:205
Definition: RTClib.h:93
RTC using the internal micros() clock, has to be initialized before use. Unlike RTC_Millis, this can be tuned in order to compensate for the natural drift of the system clock. Note that now() has to be called more frequently than the micros() rollover period, which is approximately 71.6 minutes.
Definition: RTClib.h:486
@@ -99,11 +99,10 @@ $(function() {
uint32_t lastUnix
Definition: RTClib.h:466
Definition: RTClib.h:120
Definition: RTClib.h:81
-
char * toString(char *buffer)
Writes the DateTime as a string in a user-defined format.
Definition: RTClib.cpp:441
hh:mm:ss
Definition: RTClib.h:207
A generic I2C RTC base class. DO NOT USE DIRECTLY.
Definition: RTClib.h:326
#define SECONDS_FROM_1970_TO_2000
Unixtime for 2000-01-01 00:00:00, useful for initialization.
Definition: RTClib.h:32
-
String timestamp(timestampOpt opt=TIMESTAMP_FULL)
Return a ISO 8601 timestamp as a String object.
Definition: RTClib.cpp:692
+
String timestamp(timestampOpt opt=TIMESTAMP_FULL) const
Return a ISO 8601 timestamp as a String object.
Definition: RTClib.cpp:692
Definition: RTClib.h:48
bool operator>(const DateTime &right) const
Test if one DateTime is greater (later) than another.
Definition: RTClib.h:226
int32_t _seconds
Actual TimeSpan value is stored as seconds.
Definition: RTClib.h:318
@@ -141,7 +140,6 @@ $(function() {
int8_t seconds() const
Number of seconds in the TimeSpan This is not the total seconds, it includes the days/hours/minutes e...
Definition: RTClib.h:307
uint32_t secondstime() const
Convert the DateTime to seconds since 1 Jan 2000.
Definition: RTClib.cpp:590
uint8_t m
Month 1-12.
Definition: RTClib.h:263
-
DateTime operator+(const TimeSpan &span)
Add a TimeSpan to the DateTime object.
Definition: RTClib.cpp:604
uint8_t twelveHour() const
Return the hour in 12-hour format.
Definition: RTClib.cpp:537
Definition: RTClib.h:103
int8_t hours() const
Number of hours in the TimeSpan This is not the total hours, it includes the days e...
Definition: RTClib.h:293
@@ -155,9 +153,11 @@ $(function() {
Definition: RTClib.h:70
Timespan which can represent changes in time with seconds accuracy.
Definition: RTClib.h:275
uint16_t year() const
Return the year.
Definition: RTClib.h:159
+
DateTime operator+(const TimeSpan &span) const
Add a TimeSpan to the DateTime object.
Definition: RTClib.cpp:604
Definition: RTClib.h:56
Definition: RTClib.h:63
Definition: RTClib.h:84
+
DateTime operator-(const TimeSpan &span) const
Subtract a TimeSpan from the DateTime object.
Definition: RTClib.cpp:615
uint32_t lastMicros
Definition: RTClib.h:512
uint8_t hh
Hours 0-23.
Definition: RTClib.h:265
RTC based on the DS3231 chip connected via I2C and the Wire library.
Definition: RTClib.h:370
diff --git a/html/class_date_time-members.html b/html/class_date_time-members.html index dd1ddae..199b2db 100644 --- a/html/class_date_time-members.html +++ b/html/class_date_time-members.html @@ -83,9 +83,9 @@ $(function() { mmDateTimeprotected month() constDateTimeinline operator!=(const DateTime &right) constDateTimeinline - operator+(const TimeSpan &span)DateTime - operator-(const TimeSpan &span)DateTime - operator-(const DateTime &right)DateTime + operator+(const TimeSpan &span) constDateTime + operator-(const TimeSpan &span) constDateTime + operator-(const DateTime &right) constDateTime operator<(const DateTime &right) constDateTime operator<=(const DateTime &right) constDateTimeinline operator==(const DateTime &right) constDateTime @@ -94,12 +94,12 @@ $(function() { second() constDateTimeinline secondstime() constDateTime ssDateTimeprotected - timestamp(timestampOpt opt=TIMESTAMP_FULL)DateTime + timestamp(timestampOpt opt=TIMESTAMP_FULL) constDateTime TIMESTAMP_DATE enum valueDateTime TIMESTAMP_FULL enum valueDateTime TIMESTAMP_TIME enum valueDateTime timestampOpt enum nameDateTime - toString(char *buffer)DateTime + toString(char *buffer) constDateTime twelveHour() constDateTime unixtime(void) constDateTime year() constDateTimeinline diff --git a/html/class_date_time.html b/html/class_date_time.html index 8d2e038..d98835a 100644 --- a/html/class_date_time.html +++ b/html/class_date_time.html @@ -104,9 +104,9 @@ Public Member Functions bool isValid () const  Check whether this DateTime is valid. More...
  -char * toString (char *buffer) - Writes the DateTime as a string in a user-defined format. More...
-  +char * toString (char *buffer) const + Writes the DateTime as a string in a user-defined format. More...
+  uint16_t year () const  Return the year. More...
  @@ -140,18 +140,18 @@ Public Member Functions uint32_t unixtime (void) const  Return Unix time: seconds since 1 Jan 1970. More...
  -String timestamp (timestampOpt opt=TIMESTAMP_FULL) - Return a ISO 8601 timestamp as a String object. More...
-  -DateTime operator+ (const TimeSpan &span) - Add a TimeSpan to the DateTime object. More...
-  -DateTime operator- (const TimeSpan &span) - Subtract a TimeSpan from the DateTime object. More...
-  -TimeSpan operator- (const DateTime &right) - Subtract one DateTime from another. More...
-  +String timestamp (timestampOpt opt=TIMESTAMP_FULL) const + Return a ISO 8601 timestamp as a String object. More...
+  +DateTime operator+ (const TimeSpan &span) const + Add a TimeSpan to the DateTime object. More...
+  +DateTime operator- (const TimeSpan &span) const + Subtract a TimeSpan from the DateTime object. More...
+  +TimeSpan operator- (const DateTime &right) const + Subtract one DateTime from another. More...
+  bool operator< (const DateTime &right) const  Test if one DateTime is less (earlier) than another. More...
  @@ -214,7 +214,7 @@ uint8_t  -

Format of the ISO 8601 timestamp generated by timestamp(). Each option corresponds to a toString() format as follows:

+

Format of the ISO 8601 timestamp generated by timestamp(). Each option corresponds to a toString() format as follows:

@@ -479,8 +479,8 @@ uint8_t  - +
Enumerator
TIMESTAMP_FULL 

YYYY-MM-DDThh:mm:ss

-

◆ toString()

+ +

◆ toString()

@@ -490,7 +490,7 @@ uint8_t 
char *  buffer) const
@@ -526,7 +526,7 @@ uint8_t 

The specifiers within buffer will be overwritten with the appropriate values from the DateTime. Any characters not belonging to one of the above specifiers are left as-is.

Example: The format "DDD, DD MMM YYYY hh:mm:ss" generates an output of the form "Thu, 16 Apr 2020 18:34:56.

-
See also
The timestamp() method provides similar functionnality, but it returns a String object and supports a limited choice of predefined formats.
+
See also
The timestamp() method provides similar functionnality, but it returns a String object and supports a limited choice of predefined formats.
Parameters
@@ -817,8 +817,8 @@ uint8_t  - +
[in,out]bufferArray of char for holding the format description and the formatted DateTime. Before calling this method, the buffer should be initialized by the user with the format string. The method will overwrite the buffer with the formatted date and/or time.
-

◆ timestamp()

+ +

◆ timestamp()

@@ -828,14 +828,14 @@ uint8_t 
timestampOpt  opt = TIMESTAMP_FULL) const

Return a ISO 8601 timestamp as a String object.

The generated timestamp conforms to one of the predefined, ISO 8601-compatible formats for representing the date (if opt is TIMESTAMP_DATE), the time (TIMESTAMP_TIME), or both (TIMESTAMP_FULL).

-
See also
The toString() method provides more general string formatting.
+
See also
The toString() method provides more general string formatting.
Parameters
@@ -846,8 +846,8 @@ uint8_t  - +
optFormat of the timestamp
-

◆ operator+()

+ +

◆ operator+()

@@ -857,7 +857,7 @@ uint8_t 
const TimeSpan span) const
@@ -873,8 +873,8 @@ uint8_t  -

◆ operator-() [1/2]

+ +

◆ operator-() [1/2]

@@ -884,7 +884,7 @@ uint8_t const TimeSpanspan) - + const
@@ -900,8 +900,8 @@ uint8_t  -

◆ operator-() [2/2]

+ +

◆ operator-() [2/2]

@@ -911,7 +911,7 @@ uint8_t const DateTimeright) - + const
diff --git a/html/class_r_t_c___d_s1307-members.html b/html/class_r_t_c___d_s1307-members.html index d9deaee..24fa6a6 100644 --- a/html/class_r_t_c___d_s1307-members.html +++ b/html/class_r_t_c___d_s1307-members.html @@ -78,7 +78,7 @@ $(function() { readSqwPinMode()RTC_DS1307 write_register(uint8_t reg, uint8_t val)RTC_I2Cprivate writenvram(uint8_t address, uint8_t data)RTC_DS1307 - writenvram(uint8_t address, uint8_t *buf, uint8_t size)RTC_DS1307 + writenvram(uint8_t address, const uint8_t *buf, uint8_t size)RTC_DS1307 writeSqwPinMode(Ds1307SqwPinMode mode)RTC_DS1307
diff --git a/html/class_r_t_c___d_s1307.html b/html/class_r_t_c___d_s1307.html index 465036e..c6fe784 100644 --- a/html/class_r_t_c___d_s1307.html +++ b/html/class_r_t_c___d_s1307.html @@ -109,9 +109,9 @@ Public Member Functions void writenvram (uint8_t address, uint8_t data)  Shortcut to write one byte to NVRAM. More...
  -void writenvram (uint8_t address, uint8_t *buf, uint8_t size) - Write data to the DS1307 NVRAM. More...
-  +void writenvram (uint8_t address, const uint8_t *buf, uint8_t size) + Write data to the DS1307 NVRAM. More...

Detailed Description

RTC based on the DS1307 chip connected via I2C and the Wire library.

@@ -364,8 +364,8 @@ Public Member Functions
- -

◆ writenvram() [2/2]

+ +

◆ writenvram() [2/2]

@@ -379,7 +379,7 @@ Public Member Functions - uint8_t *  + const uint8_t *  buf, diff --git a/html/class_time_span-members.html b/html/class_time_span-members.html index 8648e29..9abdfd5 100644 --- a/html/class_time_span-members.html +++ b/html/class_time_span-members.html @@ -69,8 +69,8 @@ $(function() { days() constTimeSpaninline hours() constTimeSpaninline minutes() constTimeSpaninline - operator+(const TimeSpan &right)TimeSpan - operator-(const TimeSpan &right)TimeSpan + operator+(const TimeSpan &right) constTimeSpan + operator-(const TimeSpan &right) constTimeSpan seconds() constTimeSpaninline TimeSpan(int32_t seconds=0)TimeSpan TimeSpan(int16_t days, int8_t hours, int8_t minutes, int8_t seconds)TimeSpan diff --git a/html/class_time_span.html b/html/class_time_span.html index c6eb44d..22c2855 100644 --- a/html/class_time_span.html +++ b/html/class_time_span.html @@ -98,12 +98,12 @@ Public Member Functions int32_t totalseconds () const  Total number of seconds in the TimeSpan, e.g. 358027. More...
  -TimeSpan operator+ (const TimeSpan &right) - Add two TimeSpans. More...
-  -TimeSpan operator- (const TimeSpan &right) - Subtract a TimeSpan. More...
-  +TimeSpan operator+ (const TimeSpan &right) const + Add two TimeSpans. More...
+  +TimeSpan operator- (const TimeSpan &right) const + Subtract a TimeSpan. More...
+  @@ -359,8 +359,8 @@ int32_t  - +

Protected Attributes

-

◆ operator+()

+ +

◆ operator+()

@@ -370,7 +370,7 @@ int32_t 
const TimeSpan right) const
@@ -386,8 +386,8 @@ int32_t  -

◆ operator-()

+ +

◆ operator-()

@@ -397,7 +397,7 @@ int32_t const TimeSpanright) - + const
diff --git a/html/functions.html b/html/functions.html index e60fc0f..4485578 100644 --- a/html/functions.html +++ b/html/functions.html @@ -265,12 +265,12 @@ $(function() { : DateTime
  • operator+() -: DateTime -, TimeSpan +: DateTime +, TimeSpan
  • operator-() -: DateTime -, TimeSpan +: DateTime +, TimeSpan
  • operator<() : DateTime @@ -341,7 +341,7 @@ $(function() { : TimeSpan
  • timestamp() -: DateTime +: DateTime
  • TIMESTAMP_DATE : DateTime @@ -356,7 +356,7 @@ $(function() { : DateTime
  • toString() -: DateTime +: DateTime
  • totalseconds() : TimeSpan diff --git a/html/functions_func.html b/html/functions_func.html index a1378cb..524d520 100644 --- a/html/functions_func.html +++ b/html/functions_func.html @@ -230,12 +230,12 @@ $(function() { : DateTime
  • operator+() -: DateTime -, TimeSpan +: DateTime +, TimeSpan
  • operator-() -: DateTime -, TimeSpan +: DateTime +, TimeSpan
  • operator<() : DateTime @@ -303,10 +303,10 @@ $(function() { : TimeSpan
  • timestamp() -: DateTime +: DateTime
  • toString() -: DateTime +: DateTime
  • totalseconds() : TimeSpan diff --git a/html/search/all_10.js b/html/search/all_10.js index 42b657f..d30d2bd 100644 --- a/html/search/all_10.js +++ b/html/search/all_10.js @@ -1,12 +1,12 @@ var searchData= [ ['timespan',['TimeSpan',['../class_time_span.html',1,'TimeSpan'],['../class_time_span.html#af6f4ccd4c1789c174914f1d462de74f4',1,'TimeSpan::TimeSpan(int32_t seconds=0)'],['../class_time_span.html#ae582bf4b81ecc9b720cd390249f7261b',1,'TimeSpan::TimeSpan(int16_t days, int8_t hours, int8_t minutes, int8_t seconds)'],['../class_time_span.html#a7ee93d77fe8019b3110ec9aeb1d4e9e6',1,'TimeSpan::TimeSpan(const TimeSpan &copy)']]], - ['timestamp',['timestamp',['../class_date_time.html#a7fda98373c9162c3b7c6fa304256a380',1,'DateTime']]], + ['timestamp',['timestamp',['../class_date_time.html#ab13d6eeee16d78b845f6eed5764951e3',1,'DateTime']]], ['timestamp_5fdate',['TIMESTAMP_DATE',['../class_date_time.html#a3f65aa183f72c285a03f7dd04321285aa3cd012ee63cddb295b466a3431449805',1,'DateTime']]], ['timestamp_5ffull',['TIMESTAMP_FULL',['../class_date_time.html#a3f65aa183f72c285a03f7dd04321285aa784e65d72227eca32bea310d8e067f62',1,'DateTime']]], ['timestamp_5ftime',['TIMESTAMP_TIME',['../class_date_time.html#a3f65aa183f72c285a03f7dd04321285aa917c6893834b9798f094165cc2bbc63b',1,'DateTime']]], ['timestampopt',['timestampOpt',['../class_date_time.html#a3f65aa183f72c285a03f7dd04321285a',1,'DateTime']]], - ['tostring',['toString',['../class_date_time.html#a3753bf2ae254315a56f7ee38ff0b188b',1,'DateTime']]], + ['tostring',['toString',['../class_date_time.html#a27aad4b627b20de84c23d2b0ed657cba',1,'DateTime']]], ['totalseconds',['totalseconds',['../class_time_span.html#acf4206e0878c620da06035ac1684dd87',1,'TimeSpan']]], ['twelvehour',['twelveHour',['../class_date_time.html#a5738404586a60d787aaaa4735913e9c7',1,'DateTime']]] ]; diff --git a/html/search/all_12.js b/html/search/all_12.js index c091e1c..46b15c3 100644 --- a/html/search/all_12.js +++ b/html/search/all_12.js @@ -1,6 +1,6 @@ var searchData= [ ['write_5fregister',['write_register',['../class_r_t_c___i2_c.html#a6ae48628766373ce608c61a71fcbdd3d',1,'RTC_I2C']]], - ['writenvram',['writenvram',['../class_r_t_c___d_s1307.html#ac60cf11ebb0a4dc1fe6097787caecd75',1,'RTC_DS1307::writenvram(uint8_t address, uint8_t data)'],['../class_r_t_c___d_s1307.html#a9687ba44a4f9c75cc067806e38b237e9',1,'RTC_DS1307::writenvram(uint8_t address, uint8_t *buf, uint8_t size)']]], + ['writenvram',['writenvram',['../class_r_t_c___d_s1307.html#ac60cf11ebb0a4dc1fe6097787caecd75',1,'RTC_DS1307::writenvram(uint8_t address, uint8_t data)'],['../class_r_t_c___d_s1307.html#a3099cef99081a64bec954399a424ef61',1,'RTC_DS1307::writenvram(uint8_t address, const uint8_t *buf, uint8_t size)']]], ['writesqwpinmode',['writeSqwPinMode',['../class_r_t_c___d_s1307.html#a0d0871447dc3464dc8dc127433a14691',1,'RTC_DS1307::writeSqwPinMode()'],['../class_r_t_c___d_s3231.html#a7dd635277072b79d51d830a72dae1f72',1,'RTC_DS3231::writeSqwPinMode()'],['../class_r_t_c___p_c_f8523.html#afac1866e69541cfb93251dee683f0e63',1,'RTC_PCF8523::writeSqwPinMode()'],['../class_r_t_c___p_c_f8563.html#aa69b313f7836d709a52ca013a4545c97',1,'RTC_PCF8563::writeSqwPinMode()']]] ]; diff --git a/html/search/all_c.js b/html/search/all_c.js index 9641378..faa2d9e 100644 --- a/html/search/all_c.js +++ b/html/search/all_c.js @@ -1,8 +1,8 @@ var searchData= [ ['operator_21_3d',['operator!=',['../class_date_time.html#aa64131ebd35cb40ed616b111ea501760',1,'DateTime']]], - ['operator_2b',['operator+',['../class_date_time.html#ae043350a8bfa362aabbc9f5ee658b4e6',1,'DateTime::operator+()'],['../class_time_span.html#af1dad98bdfcf07cf668e18509fbca8d4',1,'TimeSpan::operator+()']]], - ['operator_2d',['operator-',['../class_date_time.html#acbdcc7a6b55924552e72696d9e5bbb98',1,'DateTime::operator-(const TimeSpan &span)'],['../class_date_time.html#a005fb6b5723a393da66e821a93cec5a5',1,'DateTime::operator-(const DateTime &right)'],['../class_time_span.html#afe69b3603f24bcbeb16a20e5f97af79b',1,'TimeSpan::operator-()']]], + ['operator_2b',['operator+',['../class_date_time.html#a8d6b85fa26106369e81da7b824e78936',1,'DateTime::operator+()'],['../class_time_span.html#a5121884a13304ebf2b4346e90e205938',1,'TimeSpan::operator+()']]], + ['operator_2d',['operator-',['../class_date_time.html#aef3bee1f4e9de8d79426f35db1e0dbe4',1,'DateTime::operator-(const TimeSpan &span) const'],['../class_date_time.html#ac901785851a822ae9051c7916559198f',1,'DateTime::operator-(const DateTime &right) const'],['../class_time_span.html#ae276db5e4710b105f5aa5b8c3710d5f1',1,'TimeSpan::operator-()']]], ['operator_3c',['operator<',['../class_date_time.html#a6f1288d0205e97f86dfecfc7fd7b4e60',1,'DateTime']]], ['operator_3c_3d',['operator<=',['../class_date_time.html#af9da2ce38916caa365f24a38f5834b47',1,'DateTime']]], ['operator_3d_3d',['operator==',['../class_date_time.html#a0c68b136471b6f8daf575ce399ca619c',1,'DateTime']]], diff --git a/html/search/functions_10.js b/html/search/functions_10.js index c091e1c..46b15c3 100644 --- a/html/search/functions_10.js +++ b/html/search/functions_10.js @@ -1,6 +1,6 @@ var searchData= [ ['write_5fregister',['write_register',['../class_r_t_c___i2_c.html#a6ae48628766373ce608c61a71fcbdd3d',1,'RTC_I2C']]], - ['writenvram',['writenvram',['../class_r_t_c___d_s1307.html#ac60cf11ebb0a4dc1fe6097787caecd75',1,'RTC_DS1307::writenvram(uint8_t address, uint8_t data)'],['../class_r_t_c___d_s1307.html#a9687ba44a4f9c75cc067806e38b237e9',1,'RTC_DS1307::writenvram(uint8_t address, uint8_t *buf, uint8_t size)']]], + ['writenvram',['writenvram',['../class_r_t_c___d_s1307.html#ac60cf11ebb0a4dc1fe6097787caecd75',1,'RTC_DS1307::writenvram(uint8_t address, uint8_t data)'],['../class_r_t_c___d_s1307.html#a3099cef99081a64bec954399a424ef61',1,'RTC_DS1307::writenvram(uint8_t address, const uint8_t *buf, uint8_t size)']]], ['writesqwpinmode',['writeSqwPinMode',['../class_r_t_c___d_s1307.html#a0d0871447dc3464dc8dc127433a14691',1,'RTC_DS1307::writeSqwPinMode()'],['../class_r_t_c___d_s3231.html#a7dd635277072b79d51d830a72dae1f72',1,'RTC_DS3231::writeSqwPinMode()'],['../class_r_t_c___p_c_f8523.html#afac1866e69541cfb93251dee683f0e63',1,'RTC_PCF8523::writeSqwPinMode()'],['../class_r_t_c___p_c_f8563.html#aa69b313f7836d709a52ca013a4545c97',1,'RTC_PCF8563::writeSqwPinMode()']]] ]; diff --git a/html/search/functions_b.js b/html/search/functions_b.js index 9641378..faa2d9e 100644 --- a/html/search/functions_b.js +++ b/html/search/functions_b.js @@ -1,8 +1,8 @@ var searchData= [ ['operator_21_3d',['operator!=',['../class_date_time.html#aa64131ebd35cb40ed616b111ea501760',1,'DateTime']]], - ['operator_2b',['operator+',['../class_date_time.html#ae043350a8bfa362aabbc9f5ee658b4e6',1,'DateTime::operator+()'],['../class_time_span.html#af1dad98bdfcf07cf668e18509fbca8d4',1,'TimeSpan::operator+()']]], - ['operator_2d',['operator-',['../class_date_time.html#acbdcc7a6b55924552e72696d9e5bbb98',1,'DateTime::operator-(const TimeSpan &span)'],['../class_date_time.html#a005fb6b5723a393da66e821a93cec5a5',1,'DateTime::operator-(const DateTime &right)'],['../class_time_span.html#afe69b3603f24bcbeb16a20e5f97af79b',1,'TimeSpan::operator-()']]], + ['operator_2b',['operator+',['../class_date_time.html#a8d6b85fa26106369e81da7b824e78936',1,'DateTime::operator+()'],['../class_time_span.html#a5121884a13304ebf2b4346e90e205938',1,'TimeSpan::operator+()']]], + ['operator_2d',['operator-',['../class_date_time.html#aef3bee1f4e9de8d79426f35db1e0dbe4',1,'DateTime::operator-(const TimeSpan &span) const'],['../class_date_time.html#ac901785851a822ae9051c7916559198f',1,'DateTime::operator-(const DateTime &right) const'],['../class_time_span.html#ae276db5e4710b105f5aa5b8c3710d5f1',1,'TimeSpan::operator-()']]], ['operator_3c',['operator<',['../class_date_time.html#a6f1288d0205e97f86dfecfc7fd7b4e60',1,'DateTime']]], ['operator_3c_3d',['operator<=',['../class_date_time.html#af9da2ce38916caa365f24a38f5834b47',1,'DateTime']]], ['operator_3d_3d',['operator==',['../class_date_time.html#a0c68b136471b6f8daf575ce399ca619c',1,'DateTime']]], diff --git a/html/search/functions_e.js b/html/search/functions_e.js index 2fdf3a7..68384c7 100644 --- a/html/search/functions_e.js +++ b/html/search/functions_e.js @@ -1,8 +1,8 @@ var searchData= [ ['timespan',['TimeSpan',['../class_time_span.html#af6f4ccd4c1789c174914f1d462de74f4',1,'TimeSpan::TimeSpan(int32_t seconds=0)'],['../class_time_span.html#ae582bf4b81ecc9b720cd390249f7261b',1,'TimeSpan::TimeSpan(int16_t days, int8_t hours, int8_t minutes, int8_t seconds)'],['../class_time_span.html#a7ee93d77fe8019b3110ec9aeb1d4e9e6',1,'TimeSpan::TimeSpan(const TimeSpan &copy)']]], - ['timestamp',['timestamp',['../class_date_time.html#a7fda98373c9162c3b7c6fa304256a380',1,'DateTime']]], - ['tostring',['toString',['../class_date_time.html#a3753bf2ae254315a56f7ee38ff0b188b',1,'DateTime']]], + ['timestamp',['timestamp',['../class_date_time.html#ab13d6eeee16d78b845f6eed5764951e3',1,'DateTime']]], + ['tostring',['toString',['../class_date_time.html#a27aad4b627b20de84c23d2b0ed657cba',1,'DateTime']]], ['totalseconds',['totalseconds',['../class_time_span.html#acf4206e0878c620da06035ac1684dd87',1,'TimeSpan']]], ['twelvehour',['twelveHour',['../class_date_time.html#a5738404586a60d787aaaa4735913e9c7',1,'DateTime']]] ];