-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/native: implement periph_rtc_ms #19340
Merged
Merged
Conversation
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
benpicco
requested review from
leandrolanzieri,
jia200x and
MrKevinWeiss
as code owners
March 2, 2023 15:46
github-actions
bot
added
Area: boards
Area: Board ports
Area: cpu
Area: CPU/MCU ports
Area: Kconfig
Area: Kconfig integration
Platform: native
Platform: This PR/issue effects the native platform
labels
Mar 2, 2023
benpicco
added
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
labels
Mar 2, 2023
kfessel
reviewed
Mar 2, 2023
kfessel
reviewed
Mar 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are more uses of time(NULL)
in periph/rtc
, we should use one source of truth
bors bot
added a commit
that referenced
this pull request
Mar 3, 2023
19341: Picolibc updates r=benpicco a=keith-packard ### Contribution description Minor updates to picolibc support for newer versions of picolibc, including 1.8. ### Testing procedure Here's the current build result for a board I happen to have on my bench right now: ``` $ make -C examples/blinky BOARD=nucleo-f103rb FEATURES_REQUIRED=picolibc ... /home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:319:1: error: unknown type name '_READ_WRITE_RETURN_TYPE' 319 | _READ_WRITE_RETURN_TYPE read(int fd, void *dest, size_t count) | ^~~~~~~~~~~~~~~~~~~~~~~ /home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:351:1: error: unknown type name '_READ_WRITE_RETURN_TYPE' 351 | _READ_WRITE_RETURN_TYPE write(int fd, const void *src, size_t count) | ^~~~~~~~~~~~~~~~~~~~~~~ ... ``` ### Description of changes 1. Fix the read/write return values (Picolibc 1.8 uses POSIX standard types now) 2. Add new symbols to linker scripts (Picolibc needs help dealing with TLS alignment) 3. Insert carriage return when sending newline to console. 19344: test/periph_rtc: reset struct tm time between tests r=benpicco a=kfessel ### Contribution description while reviewing #19340 i found test/periph_rtc to be insufficient to prove rtc_set_time is working. this changes that and avoids accidental reuse of struct tm time and ms values by resetting time and ms; ### Testing procedure run the test ### Issues/PRs references #19340 Co-authored-by: Keith Packard <[email protected]> Co-authored-by: Karl Fessel <[email protected]>
bors bot
added a commit
that referenced
this pull request
Mar 3, 2023
19344: test/periph_rtc: reset struct tm time between tests r=benpicco a=kfessel ### Contribution description while reviewing #19340 i found test/periph_rtc to be insufficient to prove rtc_set_time is working. this changes that and avoids accidental reuse of struct tm time and ms values by resetting time and ms; ### Testing procedure run the test ### Issues/PRs references #19340 Co-authored-by: Karl Fessel <[email protected]>
benpicco
force-pushed
the
cpu/native-rtc_ms
branch
from
March 5, 2023 01:57
e1de748
to
ce36460
Compare
kfessel
approved these changes
Mar 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bors merge
bors merge |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: boards
Area: Board ports
Area: cpu
Area: CPU/MCU ports
Area: Kconfig
Area: Kconfig integration
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: native
Platform: This PR/issue effects the native platform
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
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
periph_rtc
onnative
can have ms accuracy, so implement theperiph_rtc_ms
interface.Testing procedure
tests/periph_rtc
now shows sub-second precision:Issues/PRs references