STM32 key query mode
no vote
key_ Up is a static variable, which means that it is allocated only once and is initialized only when memory is allocated for the first time. That is to say, call key for the first time_ When scan, assign the variable and set it to 1, and call key again_ When scan, the variable remains the value of the last function call