Skip to main content
Explorer II
December 6, 2023
Question

STM82103F programming issue

  • December 6, 2023
  • 2 replies
  • 1370 views

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!

gavin3_0-1701829793263.png

 

    This topic has been closed for replies.

    2 replies

    Super User
    December 6, 2023

    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.

    gavin3Author
    Explorer II
    December 6, 2023

    I put it is button.h files, following :

    gavin3_0-1701833172879.png

     

    Super User
    December 6, 2023

    And what happens if you #define it as 2 instead?