zig-bare-metal-microbit icon indicating copy to clipboard operation
zig-bare-metal-microbit copied to clipboard

Packed structs

Open FireFox317 opened this issue 4 years ago • 6 comments

You should use packed structs for mmio instead of normal structs, since normal structs don't have a in-memory defined layout and the compiler is allowed to change the order of fields for performance or other reasons. Packed structs will always have the correct layout as specified.

FireFox317 avatar Dec 31 '19 14:12 FireFox317