Get the latest tech news
Memory-mapped IO registers in Zig. (2021)
Kevin Lynagh and I spent some time playing around with zig on nrf52 boards. He's written about the experience here.
I wanted to additionally highlight the api we used for memory-mapped IO registers because it shows off some nice features of zig. For example, on the nRF52833 board writing the value 0b11 to address 0x708 will set the 3rd GPIO pin to output mode and disconnect the input buffer. We check at compile time and emit a nice error message with a call stack if the types don't match.
Or read this on Hacker News