-
Notifications
You must be signed in to change notification settings - Fork 23
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
Problems with svd2rust #72
Comments
The simplest way to fix these problems would be to update svd2rust in the following way:
To avoid breaking changes in svd2rust, these changes could be gated by a cargo feature (i.e. svd2rust would generate code that contains conditional compilation depending on a cargo feature). cc @oli-obk |
Some links that show the current API: |
@oli-obk I just read rust-embedded/svd2rust#270 and I think I understand the design decisions of svd2rust better now. I also had some new ideas how to create APIs on top of the zero sized singletons. For example, we can change our i2c type to take ownership of the ZST singleton instead of trying to store a I try to find more svd2rust pain points in our current code. Maybe I can find better solutions for them too, otherwise I'll post them in the svd2rust issue. |
&self
instead of&mut self
forwrite
andmodify
, which makes the register structs!Sync
.RegisterBlock
type, which contains the actual struct. This makes it impossible to get a&'static mut
reference to the register block without boxing and unsafe. Instead, thePeripherals
struct could directly contain&'static mut RegisterBlock
references.The text was updated successfully, but these errors were encountered: