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

Consider getting rid of RegProxy #211

Open
hannobraun opened this issue Feb 18, 2020 · 3 comments
Open

Consider getting rid of RegProxy #211

hannobraun opened this issue Feb 18, 2020 · 3 comments

Comments

@hannobraun
Copy link
Member

It was added to work around some perceived shortcomings in svd2rust (see rust-embedded/svd2rust#213), and while I still think it would be worthwhile to make the proposed improvements in svd2rust, RegProxy causes a lot of complexity in this crate, and its utility is dubious at best.

@hannobraun
Copy link
Member Author

Some more thoughts: #210 (comment)

@david-sawatzke
Copy link
Member

I think in it's current incarnation (ignoring the safety issues), RegProxy is of limited use. In syscon.rs it makes what's happening more clear, whilst in #210 it makes the code more complex & confusing.

Getting rid of RegProxy & replacing it with the unsafe equivalent, when it's used for shared registers (in ctimer, #210 and parts of dma) makes sense, but for the syscon it's seems fine if we just declare the constructor as unsafe.

@hannobraun
Copy link
Member Author

Sounds like a good compromise actually. I've added a task to my list to do just that (at the current pace, I think it'll be a few weeks).

It would be great to make RegProxy completely redundant by improving svd2rust, but there's so much to do... maybe some day.

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

No branches or pull requests

2 participants