-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v6.2.7: Fix century bit interfering with year read - Thanks @davidhbrown
- Loading branch information
Showing
4 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=uRTCLib | ||
version=6.2.6 | ||
version=6.2.7 | ||
author=Naguissa <[email protected]> | ||
maintainer=Naguissa <[email protected]> | ||
sentence=Really tiny library to basic RTC functionality on Arduino. DS1307, DS3231 and DS3232 RTCs are supported. See https://github.com/Naguissa/uEEPROMLib for EEPROM support. Temperature, Alarms, SQWG and RAM support. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/rtclib-arduino-libreria-simple-y-eficaz-para-rtc-y-t95.html">https://www.foroelectro.net/librerias-arduino-ide-f29/rtclib-arduino-libreria-simple-y-eficaz-para-rtc-y-t95.html</a> | ||
* @see <a href="mailto:[email protected]">[email protected]</a> | ||
* @see <a href="https://github.com/Naguissa/uEEPROMLib">See uEEPROMLib for EEPROM support.</a> | ||
* @version 6.2.6 | ||
* @version 6.2.7 | ||
*/ | ||
|
||
#include <Arduino.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/rtclib-arduino-libreria-simple-y-eficaz-para-rtc-y-t95.html">https://www.foroelectro.net/librerias-arduino-ide-f29/rtclib-arduino-libreria-simple-y-eficaz-para-rtc-y-t95.html</a> | ||
* @see <a href="mailto:[email protected]">[email protected]</a> | ||
* @see <a href="https://github.com/Naguissa/uEEPROMLib">See uEEPROMLib for EEPROM support.</a> | ||
* @version 6.2.6 | ||
* @version 6.2.7 | ||
*/ | ||
/** \file uRTCLib.h | ||
* \brief uRTCLib header file | ||
|
@@ -220,16 +220,25 @@ | |
*/ | ||
#define uRTCLIB_bcdToDec(val) ((uint8_t) ((val / 16 * 10) + (val % 16))) | ||
|
||
// ESP8266 yield function (ESP32 has no need for that) | ||
// ESP yield function (ESP32 has no need for that on dual core, but it has on single core version) | ||
#if ARDUINO_ARCH_ESP8266 | ||
/** | ||
* \brief ESP8266, yield to don't block ESP functionality. | ||
* | ||
* When this library is used in other MCUs this is simply removed by the preprocessor | ||
*/ | ||
#define uRTCLIB_YIELD yield(); | ||
#else | ||
#if ARDUINO_ARCH_ESP32 | ||
/** | ||
* \brief Only on ESP8266, yield to don't block ESP functionality. | ||
* \brief ESP32, yield to don't block ESP functionality. | ||
* | ||
* When this library is used in other MCUs this is simply removed by the preprocessor | ||
*/ | ||
#define uRTCLIB_YIELD | ||
#define uRTCLIB_YIELD yield(); | ||
#else | ||
#define uRTCLIB_YIELD | ||
#endif | ||
#endif | ||
|
||
class uRTCLib { | ||
|