Skip to content

Conversation

@piotrfila
Copy link
Contributor

This is my attempt at making Mmio access-type aware. This could catch things like trying to write to a read-only register.

@piotrfila piotrfila marked this pull request as draft February 2, 2026 04:35
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Lint Results

Found 1 issue on changed lines in 1 file:

  • core/src/mmio.zig: 1 issue

const size = @bitSizeOf(PackedT);
if ((size % 8) != 0)
@compileError("size must be divisible by 8!");
const IntT, const reg_fields = switch (@typeInfo(PackedT)) {
Copy link

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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

= 1

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

Successfully merging this pull request may close these issues.

2 participants