This is currently customized for the STM8S003 but it can easily be adapted to any other STM8 and possibly to STM32 as well.
Porting to other architectures shouldn't be too hard either.
Things to do in the future:
- Control PWM devices (deeply architecture dependent)
- Read ADC values (ditto)