2018-11-04 04:42 PM
2018-11-04 05:51 PM
use a timer interrupt to give a timebase or
I use the Systick,
just add something like this:
mSint = true;
in your foreground process;
if( mSint){
msint = false;
process_key_Detect();
}
here is a rough debouncer.
processKeyDetect(){
if (keydown)
{
down ++
up = 0;
}
if (keyup)
{
up ++
down = 0;
}
if(up >20) we have key release; up =0;
if(down >20) we have keypress; down =0;
}
2018-11-04 06:11 PM
sorry,
I still don't understand. i use stm32cubemx, true studio and hal library.
2018-11-04 06:28 PM
Yes, I use the Cube and Hal too..
I think you need to do some more examples..
2018-11-04 06:57 PM
thank you, maybe there are video suggestions or tutorial blogs that are like this case