cpu/efm32: RTC Series 0: use RTC helper functions#15413
Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom Nov 11, 2020
Merged
cpu/efm32: RTC Series 0: use RTC helper functions#15413benpicco merged 1 commit intoRIOT-OS:masterfrom
benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
By using the RTC helper functions instead of POSIX mktime()/gmtime() we can not only extend the RTC range beyond Y2038. For tests/periph_rtc: before: text data bss dec hex filename 28028 248 2472 30748 781c stk3700/tests_periph_rtc.elf after: text data bss dec hex filename 19400 144 2424 21968 55d0 stk3700/tests_periph_rtc.elf fixes RIOT-OS#13277
Contributor
|
@benpicco I currently don't have access to a |
Contributor
Author
|
I don't have a Series 0 board unfortunately. |
Member
|
I have a series 0 board. Can do some tests tonight. |
Member
|
Works fine on the STK3600: Quite amazed how much bytes it saved, although my difference is smaller ('only' 6764 bytes). |
basilfx
approved these changes
Nov 11, 2020
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
By using the RTC helper functions instead of POSIX
mktime()/gmtime()we can not only extend the RTC range beyond Y2038, but also save some ROM.For
tests/periph_rtc:before:
after:
Testing procedure
tests/periph_rtcshould still run on Series 0 MCUs.Issues/PRs references
fixes #13277