Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci(pre-commit): Apply automatic fixes
  • Loading branch information
pre-commit-ci-lite[bot] authored Aug 27, 2025
commit 6c24deeeae1e6b37e8949f2534c0531eceb2ab49
4 changes: 2 additions & 2 deletions cores/esp32/esp32-hal-ledc.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ void analogWrite(uint8_t pin, int value) {

void analogWriteFrequency(uint8_t pin, uint32_t freq) {
ledc_channel_handle_t *bus = (ledc_channel_handle_t *)perimanGetPinBus(pin, ESP32_BUS_TYPE_LEDC);
if (bus != NULL) { // if pin is attached to LEDC change frequency, otherwise update the global frequency
if (bus != NULL) { // if pin is attached to LEDC change frequency, otherwise update the global frequency
if (ledcChangeFrequency(pin, freq, analog_resolution) == 0) {
log_e("analogWrite frequency cant be set due to selected resolution! Try to adjust resolution first");
return;
Expand All @@ -796,7 +796,7 @@ void analogWriteFrequency(uint8_t pin, uint32_t freq) {

void analogWriteResolution(uint8_t pin, uint8_t resolution) {
ledc_channel_handle_t *bus = (ledc_channel_handle_t *)perimanGetPinBus(pin, ESP32_BUS_TYPE_LEDC);
if (bus != NULL) { // if pin is attached to LEDC change resolution, otherwise update the global resolution
if (bus != NULL) { // if pin is attached to LEDC change resolution, otherwise update the global resolution
if (ledcChangeFrequency(pin, analog_frequency, resolution) == 0) {
log_e("analogWrite resolution cant be set due to selected frequency! Try to adjust frequency first");
return;
Expand Down
Loading