diff --git a/ports/esp32/machine_pwm.c b/ports/esp32/machine_pwm.c index 53808c5d1bdc5..05250a7848504 100755 --- a/ports/esp32/machine_pwm.c +++ b/ports/esp32/machine_pwm.c @@ -385,8 +385,8 @@ static void set_duty_u16(machine_pwm_obj_t *self, int duty) { if (err != ESP_OK) #endif { - check_esp_err(ledc_set_duty(self->mode, self->channel, channel_duty)); - check_esp_err(ledc_update_duty(self->mode, self->channel)); + check_esp_err(ledc_set_duty(self->mode, self->channel, channel_duty)); + check_esp_err(ledc_update_duty(self->mode, self->channel)); } self->duty_x = UI_RES_16_BIT;