Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add bounded-registers to tools #222

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

Merged
bors merged 2 commits into rust-embedded:master from jonlamb-gh:master
Dec 2, 2019
Merged

Add bounded-registers to tools #222

bors merged 2 commits into rust-embedded:master from jonlamb-gh:master
Dec 2, 2019

Conversation

Copy link
Contributor

@jonlamb-gh jonlamb-gh commented Nov 27, 2019

For anyone curious about what bounded-registers look like, I have been hacking on a personal bcm2711 crate in my Raspberry Pi 4 bare metal workspace.
https://github.com/jonlamb-gh/rpi4-rust-workspace

Copy link

r? @therealprof

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels Nov 27, 2019
Copy link
Member

andre-richter commented Nov 27, 2019
edited
Loading

For personal interest:
This looks very similar to the widespread tock-register-interface, which we also reuse in register-rs internally here.

How does this one differ from tock?

Copy link
Contributor Author

It's intentionally very similar to the tock-register-interface; with the addition of type-based bounds checking.
The author, Dan, has a blog post covering some of the motivations
if interested: https://blog.auxon.io/2019/10/25/type-level-registers/

Copy link
Member

Thanks!
We have register-rs further down in the list too.
I think it could be beneficial for users to list them side-by-side and concisely explain the differences. Otherwise it's just by chance what users stumble upon first instead of making an informed decision.

Would you be up helping with that?
Register-rs is basically tock registers with added support for cpu register definition using the same API as for the MMIO ones. So for bigger projects you then have homogenous interfaces to registers of all kinds.
So we would put that explanation, plus the differences between the bounded and tock crates.
I think tock's API has some more features as well at this point? The newly gained register block definition macro comes to my mind. Does bounded have something like InMemoryRegister too?

Best,
Andre

Copy link
Contributor Author

Good idea 👍, I'm happy to do that.
I'll take a look at the latest Tock API and push up a change to relocate the item alongside register-rs as well as some delineation between them once I'm back from holiday travels.
I don't think bounded-registers has an explicit equivalent to InMemoryRegister or register_structs macro, both would be really nice to have though.

andre-richter reacted with rocket emoji

Copy link
Member

@andre-richter andre-richter left a comment

Choose a reason for hiding this comment

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

Excellent, thank you.

bors r+

bors bot added a commit that referenced this pull request Dec 2, 2019
222: Add bounded-registers to tools r=andre-richter a=jonlamb-gh
For anyone curious about what bounded-registers look like, I have been hacking on a personal `bcm2711` crate in my Raspberry Pi 4 bare metal workspace.
https://github.com/jonlamb-gh/rpi4-rust-workspace
Co-authored-by: Jon Lamb <jon@auxon.io>
Co-authored-by: Andre Richter <andre-richter@users.noreply.github.com>
Copy link
Contributor

bors bot commented Dec 2, 2019

@bors bors bot merged commit 63d73ee into rust-embedded:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@berkus berkus Awaiting requested review from berkus berkus is a code owner

@rahul-thakoor rahul-thakoor Awaiting requested review from rahul-thakoor rahul-thakoor is a code owner

@RandomInsano RandomInsano Awaiting requested review from RandomInsano RandomInsano is a code owner

1 more reviewer

@andre-richter andre-richter andre-richter approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /