Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement HardwareTimer library for Timer management #146
Something like this, but user friendly: https://github.com/adafruit/Adafruit_ZeroTimer/
@franciscogimeno2000 simply because not ported for stm32. Ex Flexitimer uses direct register acces but this is not the same for stm32.
For my projects i usually use particle boards, the are also based on STM32.
They use Free RTOS, also available for more stm32 boards, but if you don't want use Free RTOS can you use the same interface for class.
PS: remember to use also std::function as callback.
I have a NUCLEO F1 and F4 and spent the weekend trying to use timer.h / timer.c with them. It was a struggle.
For example (I'm going to truncate my code, and I don't have to use
Yet, this does:
In my callback I blinked an led and I used the following to debug after initializing:
In the first example I got: 0, 0, 0
From looking through the code, the TimerPulseInit actually assigns a timer:
Whereas TimerHandleInit does not assign a timer.
In fact, I couldn't figure out for the life of me how to assign a specific timer to either of these functions, however I tried
Can I suggest the following:
This would greatly simplify everything. I think this is almost there, and the efforts to simplify the setup are good so far... just needs a bit of polish.
hello is this implimented already?