Timer API question
Posted: 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?
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?