Page 1 of 1

Timer API question

Posted: Sat Sep 07, 2024 2:02 pm
by Karlheinz
Hello,

I want to use the Arduino-ESP32 Timer API. I’m working with vscode and platformio (both latest version). I have updated the platform to Espressif 32, 6.8.1, framework-arduinoespressif32 v. 3.20017.0.

I expect the new Espressif interface for the timer API. That means e.g.
hw_timer_t *idle_timer = timerBegin(10000000);
instead
hw_timer_t *idle_timer = timerBegin(0, apb_freq/10000000, false);

But the compiler produces an error:
error: too few arguments to function 'hw_timer_t* timerBegin(uint8_t, uint16_t, bool)'

This is my platformio.ini:

[env:esp32-c3-devkitm-1]
platform = espressif32 @ 6.8.1
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1
-D ARDUINO_USB_MODE=1


What am I doing wrong?

Re: Timer API question

Posted: Sun Sep 08, 2024 6:28 pm
by lbernstone
That is actually arduino-esp32 v2.0.17
Platformio no longer directly supports arduino-esp32. It has been forked.

Re: Timer API question

Posted: Mon Sep 09, 2024 11:22 am
by Karlheinz
Thanks a lot for your hint