ESP32 Timer Interrupt

Hi Folks,
I am using Esp32 Dev Module to develop the timer interrupt code .but when I am using timerBegin() function I am getting errors like that: timerBegin() function can accept only one argument.Please help me out this problem.For you reference I am posting my code.

===================================
#define LED 21
hw_timer_t *Timer0_Cfg = NULL;

void IRAM_ATTR Timer0_ISR()
{
digitalWrite(LED, !digitalRead(LED));
}
void setup()
{
pinMode(LED, OUTPUT);
Timer0_Cfg = timerBegin(0, 80, true);
timerAttachInterrupt(Timer0_Cfg, &Timer0_ISR, true);
timerAlarmWrite(Timer0_Cfg, 1000, true);
timerAlarmEnable(Timer0_Cfg);
}
void loop()
{
// Do Nothing!
}

Thanks.

It looks like you're using example code meant for a version of the ESP32 Arduino Core prior to the most current 3.0. There were breaking changes introduced in 3.0. See Here.

And Here.

BTW, next time please post your code using code tags as clearly explained in the forum guidelines.

try replacing the above with

 if ((Timer1_Cfg = timerBegin(1000000)) == NULL)  // API 3.0 setup timer for 1uSec
    Serial.println("timerBegin Failed!!");

for complete code see post unable-to-get-timers-to-compile-on-esp32-nano