ESP32 Code Compilation Error after Board Update: 'ledcSetup' and 'ledcAttachPin' Not Declared

i have esp32 and i used this code, but since last update of board this code dont compile anymore

 
void setup() {  
  analogReadResolution(6);                 // Set analog read resolution: 6biots(0-63),  8 bits(0-255), 10 bits (0-1023)
  ledcSetup(0, 50, 6);                     // Configure PWM channel 0, 5000 Hz frequency, 6-bit resolution
  ledcAttachPin(26, 0);  // Attach the PWM channel to GPIO26
  ledcWrite(0, 25);
}

I'm getting the following errors:

C:\Users\q\Documents\Arduino\test\test.ino: In function 'void setup()':
C:\Users\q\Documents\Arduino\test\test.ino:136:3: error: 'ledcSetup' was not declared in this scope; did you mean 'ledc_stop'?
136 | ledcSetup(0, 50, 6); // Configure PWM channel 0, 5000 Hz frequency, 6-bit resolution
| ^~~~~~~~~
| ledc_stop
C:\Users\q\Documents\Arduino\test\test.ino:137:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
137 | ledcAttachPin(M6_GPIO_throttle_OUT, 0); // Attach the PWM channel to GPIO26
| ^~~~~~~~~~~~~
| ledcAttach

exit status 1

Compilation error: 'ledcSetup' was not declared in this scope; did you mean 'ledc_stop'?

This has already been addressed in these forums:

ledcSetup with ESP32 Core V3.0.0 not work

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.