Skip to content
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

Real Time Clock support and examples #334

Merged
merged 8 commits into from
Oct 18, 2023
Merged

Real Time Clock support and examples #334

merged 8 commits into from
Oct 18, 2023

Conversation

Remus7
Copy link
Contributor

@Remus7 Remus7 commented Jul 24, 2023

Pull Request Overview

This pull request adds Real Time Clock support for libtock-c apps. Specifically, in libtock folder were added rtc.c and rtc,h, which communicate with the date_time capsule from another pull requst to the main tock repository (tock/tock#3559). Additionally, in the examples folder was added an example rtc app, which firs sets a time and date at the beggining and then prints updated time every second.

Testing Strategy

This pull request was tested by running the example project provided on the nucleo-stm429zi and raspberry pi pico boards.

Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

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

It's not a huge deal, but probably better to not have an idiom of large(?) struct-copying floating around libtock (said, without checking if we are doing that elsewhere that we shouldn't be..).

Otherwise this looks good, and is just blocked on the kernel interface settling / being merged.

libtock/rtc.h Outdated Show resolved Hide resolved
examples/rtc_app/main.c Outdated Show resolved Hide resolved
libtock/rtc.c Outdated Show resolved Hide resolved
Remus7 and others added 3 commits July 31, 2023 14:52
Co-authored-by: Pat Pannuto <[email protected]>
Co-authored-by: Pat Pannuto <[email protected]>
@Remus7
Copy link
Contributor Author

Remus7 commented Jul 31, 2023

Thank you for the suggestions, I have merged the changes into the project. However, this week I will be unable to test whether this program still runs as expected, since I do not have access to a board with date_time support. I will try to test this again around next week, but otherwise, the requested changes have been updated.

@Remus7
Copy link
Contributor Author

Remus7 commented Aug 19, 2023

I checked the example project now, and it works as intended, including the changes that were made to the main tock capsule

ppannuto
ppannuto previously approved these changes Aug 19, 2023
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

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

Great, this is ready to go once the kernel side is merged. We generally defer libtock merges until the kernel merge lands.

@ppannuto ppannuto added the blocked Blocked on promised changes or other PRs label Aug 19, 2023
@Remus7
Copy link
Contributor Author

Remus7 commented Oct 12, 2023

The changes to the main tock repository have been merged.

@ppannuto ppannuto removed the blocked Blocked on promised changes or other PRs label Oct 13, 2023
auto-merge was automatically disabled October 18, 2023 13:37

Head branch was pushed to by a user without write access

@ppannuto ppannuto added this pull request to the merge queue Oct 18, 2023
Merged via the queue into tock:master with commit 63400a7 Oct 18, 2023
4 checks passed
tyler-potyondy pushed a commit to tyler-potyondy/libtock-c that referenced this pull request Mar 13, 2024
Real Time Clock support and examples
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