Good afternoon everyone)
I continue to transfer my project (on STM32) to RTOS and I really like using RTOS)
But, accustomed to using the classic while, I can’t form an understanding of how to now do the same but with an RTOS…
I have 15 buttons connected to the microcontroller inputs
In the classic scheme, I used a self-written function, which was constantly polled in the main loop.
If the button is pressed continuously for more than 50ms (or another value), then consider that the button is pressed and perform any actions.
If the button is continuously released for more than 50ms (or another value), then consider that the button is released and perform any actions.
I understand that constant polling in an RTOS is not good.
I was thinking about putting my function in an idle task function or a timer daemon function, but I’m not sure if that would be the right solution.
For reference,. my function is not blocking, but it takes some time to compare the time interval and write some flag, but nothing that would take a lot of time.
What solution could be found in an RTOS?