@auxym, thats cool! It'd be awesome to use a pure Nim layer for that. Unfortunately my tasks are mostly "get devices working" currently so it's not an area I'm able to play with much.
I've run into issues with the whole {.bycopy.} before. Mainly just from not being sure how it works. Something to dig into.. That sort of register manipulation does work when binding Nim to existing C structs though, but it's a bit fiddly as you need to declare/abuse a var to an existing memory location as well as have the struct wrapper.