microzig
microzig copied to clipboard
Fix mmio toggle
In zig 0.11.0, struct field default_value always returns an opaque pointer which can't be used in @tagName.
I'm not entirely sure how the original API worked but this implementation allows selective toggling of bits in each field of registers via a xor mask:
REG.toggle(.{ .FIELD = MASK });