There is even an expression for this: #ifdef Hell.
To make things more comprehensive, I thought it might make sense to split this up into different implementation files. I tried to do this manually but soon got so confused that I stopped and searched for an automatic solution.
That’s when I found the unifdef tool – and this really made the difference!
So let’s see if after the cleanup I manage to provide support for the Raspberry Pico…