|There's little more satisfying than spelunking through a little MCU's hardware registers to try to eek some more performance out of its I/O. DMA, hardware SPI, SDMMC, here there be dragons.
Every new platform is like unwrapping a new toy. Downside is my code is getting uglier and uglier as it supports more and more platforms, with little I can do about it.
When it comes to driving LCD displays, one thing I did though was this. I decoupled the graphics driver itself, from the bus it uses, and both of those from the graphics library.
So now, I improve the bus, say optimizing it to use the Teensy's DMA capabilities and blammo all of my drivers benefit.
My code is unique in terms of IoT graphics libraries in that way.
The bottom line is a little mess goes a long way and improves performance for all my driver code across the board.
I've done it for the ESP32, and in part for the Teensy 4.x so far - the latter is a work in progress.
It's deeply satisfying to cover that much ground by modifying one header file.
And to do so by going back to the kind of coding I grew up with - smashing things up until i get to the wiring in the walls, figure out how it works, and tap right into the mains.
To err is human. Fortune favors the monsters.