Skip to content

Commit

Permalink
Add error check to refresh function. Now this function returns bool v…
Browse files Browse the repository at this point in the history
…alue, false on errors: PR #36 Thanks @BenUniqcode
  • Loading branch information
Naguissa committed Feb 12, 2024
1 parent aee47ae commit 3933e27
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ derbic7 - https://github.com/derbic7 - alarmDisable fix for alarm2. Also AlarmTr
lbovet - https://github.com/lbovet - Binary masks were wrongly set as hexadecimal numbers, PR #31
pk17r - https://github.com/pk17r - EOSC flag, improvements, DoW correction, documentation and improved example. PR #34
pk17r - https://github.com/pk17r - Yes, again. 12/24h, improvements and bugfixes ( #27 ): PR #35
Ben Wheeler - https://github.com/BenUniqcode - Add error check to refresh function. Now this function returns bool value, false on errors: PR #36



Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=uRTCLib
version=6.8.0
version=6.9.0
author=Naguissa <naguissa@foroelectro.net>
maintainer=Naguissa <naguissa@foroelectro.net>
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, Power lost and RAM support.
Expand Down
4 changes: 3 additions & 1 deletion src/uRTCLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @see <a href="https://github.com/Naguissa/uEEPROMLib">See uEEPROMLib for EEPROM support.</a>
* @version 6.8.0
* @version 6.9.0
*/

#include <Arduino.h>
Expand Down Expand Up @@ -69,6 +69,8 @@ uRTCLib::uRTCLib(const int rtc_address, const uint8_t model) {

/**
* \brief Refresh data from HW RTC
*
* @return False on error
*/
bool uRTCLib::refresh() {
uRTCLIB_YIELD
Expand Down
4 changes: 3 additions & 1 deletion src/uRTCLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @see <a href="https://github.com/Naguissa/uEEPROMLib">See uEEPROMLib for EEPROM support.</a>
* @version 6.8.0
* @version 6.9.0
*/
/** \file uRTCLib.h
* \brief uRTCLib header file
Expand Down Expand Up @@ -317,6 +317,8 @@
/******* RTC functions ********/
/**
* \brief Refresh data from HW RTC
*
* @return False on error
*/
bool refresh();
/**
Expand Down

0 comments on commit 3933e27

Please sign in to comment.