Timer API question

Karlheinz
Posts: 3
Joined: Sat Sep 07, 2024 1:24 pm

Timer API question

Postby Karlheinz » Sat Sep 07, 2024 2:02 pm

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?

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: Timer API question

Postby lbernstone » Sun Sep 08, 2024 6:28 pm

That is actually arduino-esp32 v2.0.17
Platformio no longer directly supports arduino-esp32. It has been forked.

Karlheinz
Posts: 3
Joined: Sat Sep 07, 2024 1:24 pm

Re: Timer API question

Postby Karlheinz » Mon Sep 09, 2024 11:22 am

Thanks a lot for your hint

Who is online

Users browsing this forum: No registered users and 68 guests