Skip to content

Comments

Add the option to see if a Power on Reset has taken place and the RTC data is NOT valid.#12

Open
bricomp wants to merge 10 commits intoconstiko:masterfrom
bricomp:master
Open

Add the option to see if a Power on Reset has taken place and the RTC data is NOT valid.#12
bricomp wants to merge 10 commits intoconstiko:masterfrom
bricomp:master

Conversation

@bricomp
Copy link

@bricomp bricomp commented Feb 9, 2024

Add the option to see if a Power on Reset has taken place and the RTC data is NOT valid.
Upon a program start it is useful to detect whether the RTC data is valid (or Not).
With the following changes this is possible.

  1. Add the variable bool timeUpdateRequired = true; to tyhe .h file.
  2. In the .cpp file add this line before the return:
    timeUpdateRequired = readBit(RV3028_STATUS, STATUS_PORF);
    In that way as soon as the RTC.begin is initiated the variable RTC.timeUpdateRequired can investigated to see if the date/time needs setting on the 3028.

Copy link
Owner

@constiko constiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Robert! Could you remove the two extra source files?

@bricomp
Copy link
Author

bricomp commented Feb 9, 2024 via email

@bricomp
Copy link
Author

bricomp commented Feb 10, 2024 via email

@bricomp bricomp requested a review from constiko February 29, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants