Andrew Zonenberg on Nostr: This is C++ actually. I generally have two levels of abstraction for all of my memory ...
This is C++ actually.
I generally have two levels of abstraction for all of my memory mapped peripherals, a volatile struct for the raw registers and then a C++ wrapper class exposing an API to applications that hides the details of the registers and just gives you commands like "write byte to UART" or "check if SPI transaction has finished" or "read current value of counter".
I generally have two levels of abstraction for all of my memory mapped peripherals, a volatile struct for the raw registers and then a C++ wrapper class exposing an API to applications that hides the details of the registers and just gives you commands like "write byte to UART" or "check if SPI transaction has finished" or "read current value of counter".