periph/rtc: add rtc_pre_set_time() and rtc_post_set_time()#21366
Closed
fabian18 wants to merge 3 commits intoRIOT-OS:masterfrom
Closed
periph/rtc: add rtc_pre_set_time() and rtc_post_set_time()#21366fabian18 wants to merge 3 commits intoRIOT-OS:masterfrom
rtc_pre_set_time() and rtc_post_set_time()#21366fabian18 wants to merge 3 commits intoRIOT-OS:masterfrom
Conversation
5d28390 to
9530c18
Compare
crasbe
reviewed
Apr 6, 2025
| void rtc_init(void); | ||
|
|
||
| /** | ||
| * @brief Hook to be implemented by the application to prepare for a time travel |
Contributor
There was a problem hiding this comment.
It's always good to be prepared for time travel.
But on a serious note: It would be good to add some more information on why an application would need/want this.
Contributor
|
I think applications shouldn't use the RTC API directly at all. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Add weak
rtc_pre_set_time()andrtc_post_set_time()to let an application react to time changes.Testing procedure
make -C tests/periph/rtc flash termThe
-161019575matches the difference between2020-02-28 23:59and2025-04-06 15:39:32.Issues/PRs references
A previous implementation: #17416