Error: analogSetSamples and analogSetCycles not declared in scope

Hi all, having issues with compiling. I can compile and upload code onto esp32 just find through arduino IDE. However, when using platformio with the following ini i receive the errors that in my void setup…

error: ‘analogSetCycles’ was not declared in this scope.
error: 'analogSetSamples was not declared in this scope.

ini is

[env:heltec_wifi_lora_32_V2]

platform = espressif32

board = heltec_wifi_lora_32_V2

framework = arduino

lib_deps =

heltecautomation/Heltec ESP32 Dev-Boards@1.1.0

I guess that in the Arduino IDE, you’re using the dedicated “Heltec ESP32 Series Dev-Boards” core per https://docs.heltec.org/en/node/esp32/esp32_general_docs/quick_start.html#via-arduino-board-manager?

PlatformIO uses the verbatim Arduino-ESP32 core, not Heltec’s fork, so some functions may be unavailable.