The comparisons were long-winded and repetitive, so I made a macro to
make them more concise. Also, all the NEC timing macros now have names
starting with NEC_.
Now the NEC reading code doesn't leak excessive information to the rest
of the firmware, keeping its internal state in static variables at
function scope.
It looks for the signal sent by the MINIX remote's power button and
sends the one sent by the GO.VIDEO remote's power button. It has a few
reliability problems and the code's a bit of a mess, so there's still
work to do.
This commit adds some functions for sending RC5 signals. The main
thread uses these functions to send the TV power off signal continuously
after booting. The timings are supposed to match the RC5 standard, but
the carrier is 38 kHz because I don't know. The TV seems to like what
I'm sending it, so I'm not worried.
Based on ChibiOS's RT-STM32F103RB-NUCLEO64 example, reconfigured for the
STM32F103C8_MINIMAL board and organized the way I like to organize my
ChibiOS projects.