Closed TG9541 closed 3 years ago
Moving the C ISR protypes, only needed for the STM8 eForth "simulated serial" and "background task" interrupt handlers, from main.c
to forth.h
offers some interesting configuration options. I made a test with the STM8L RTC/Wakeup-Timer (#375) which worked out very well: TIM2/TIM3 ISR prototypes were removed, a modified version of bgtask.inc
was created etc,
All the details and code are in the Gist STM8L051F3: Experimenting with a low-power console .
Some stuff is hardcoded in
main.c
, which is more a linker configuration in STM8 eForth proper but which might take a completely different role in downstream projects. Moving all constants and the ISR prototypes toforth.h
, and moving that file to./inc
would make creating solutions like the one for #375 easier to create and to maintain.