-
Notifications
You must be signed in to change notification settings - Fork 139
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
Missing pub
in register bitfields
#478
Comments
Or to write an SVD file and use svd2rust... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In general, the definitions for a lot of the registers defined in
SCB
,SAU
, etc., are rather deficient, but my current complaint is the Fault Status registers.The ones defined in
SCB
are just defined asRW<u32>
, so if you want to check individual bits, you have to define your ownbitfield
(or do the bit twiddling manually). Disappointing, but usable.In
SAU
, the situation seems a little better: there arebitfield
macros forSfsr
andSfar
! That sounds great, until you try to use them:which gets you
so you end up having to do the same thing (define your own
bitfield
or do the bit twiddling manually), only now you have to pull the value out of the existingbitfield
withsfsr.0
.The
sau
crate doesn't do anything with this register, yet thisbitfield
definition makes it useless outside of the crate.Fix
The register definitions could use a lot of love 🙁, but the obvious fix here is to make the fields in the bitfield
pub
, e.g.:The text was updated successfully, but these errors were encountered: