This library enables you to use Interrupt from Hardware Timers on RP2040-based boards such as RASPBERRY_PI_PICO. These RPI_PICO_TimerInterrupt Hardware Timers, using Interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's mandatory if you need to measure some data requiring better accuracy. It now supports 16 ISR-based Timers, while consuming only 1 Hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based Timers. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks.
MIT License
32
stars
15
forks
source link
invalid conversion from 'void (*)()' to 'pico_timer_callback' {aka 'bool (*)(repeating_timer*)'} #2
Great that you can solve the problem by yourself.
It's always better to recheck the working examples and compare to see what we're doing not correctly.
Hi I get an error compiling an example from your git website on Raspberry Pico Core 1.13.1 in Arduino I'm trying to use only Hardware Timer directly:
TimerHandler:
1.2 Set Hardware Timer Interval and attach Timer Interrupt Handler function directly OR
Error : invalid conversion from 'void ()()' to 'pico_timer_callback' {aka 'bool ()(repeating_timer*)'} [-fpermissive]
1.3 Set Hardware Timer Frequency and attach Timer Interrupt Handler function.
Error : invalid conversion from 'void ()()' to 'pico_timer_callback' {aka 'bool ()(repeating_timer*)'} [-fpermissive]
And in loop
I have fixed this error. Change TimerHandler to: