2023-12-05 06:30 PM
HI Guys,
now I use STM8S103F2 series MCU develop, find there was some issue that can not solve, but i checked that bool types constant has no problem, so do you have same issue? thanks!
2023-12-05 07:17 PM - edited 2023-12-05 07:20 PM
Looks like the problem is BUTTON_TYPE_MAX. How is that defined? The definition isn't in your screenshot.
It needs to be a #defined constant in order for the compiler to know how big the arrays should be. It can't be a variable.
2023-12-05 07:26 PM
I put it is button.h files, following :
2023-12-06 06:05 AM
And what happens if you #define it as 2 instead?