07-05-2023, 01:12 AM
(This post was last modified: 07-05-2023, 01:44 AM by WhiteHexagon.)
Perfectly explained as always, thanks
I had a funny moment of enlightenment after a couple more days re-learning C. The whole point of this was to exercise my Zig skills, so then I had some fun porting my KEYADC code back up to the Zig layer. Some inspiration for Register handling from link below, but using a packed struct(u32) for bool bit flags. Looks like Zig are currently adding some builtins to improve this usecase.
https://www.scattered-thoughts.net/writing/mmio-in-zig/
My interrupt code is working, but I seem to miss the occasional KEYUP event, so next job is looking at that in more detail. I got some debug back on the display now, and found a bigger font that my eyes can read
PS the missing interrupts are regardless of C or Zig, so maybe something GIC layer, next learning exercise
I had a funny moment of enlightenment after a couple more days re-learning C. The whole point of this was to exercise my Zig skills, so then I had some fun porting my KEYADC code back up to the Zig layer. Some inspiration for Register handling from link below, but using a packed struct(u32) for bool bit flags. Looks like Zig are currently adding some builtins to improve this usecase.
https://www.scattered-thoughts.net/writing/mmio-in-zig/
My interrupt code is working, but I seem to miss the occasional KEYUP event, so next job is looking at that in more detail. I got some debug back on the display now, and found a bigger font that my eyes can read
PS the missing interrupts are regardless of C or Zig, so maybe something GIC layer, next learning exercise