-
Notifications
You must be signed in to change notification settings - Fork 164
core.Mmio: Respect field access type #895
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
base: main
Are you sure you want to change the base?
Conversation
Lint ResultsFound 1 issue on changed lines in 1 file:
|
| const size = @bitSizeOf(PackedT); | ||
| if ((size % 8) != 0) | ||
| @compileError("size must be divisible by 8!"); | ||
| const IntT, const reg_fields = switch (@typeInfo(PackedT)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Rename IntT to Int_T, it should be more in line with our style guidelines. This automation is not perfect so take it with a grain of salt.
| }, | ||
| .nrf52 => { | ||
| CLOCK.TASKS_CAL.write_raw(1); | ||
| CLOCK.TASKS_CAL.raw(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
= 1
This is my attempt at making Mmio access-type aware. This could catch things like trying to write to a read-only register.