mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ledc_clock_mode' into 'master'
driver: ledc: Fix clock mode selection See merge request espressif/esp-idf!5747
This commit is contained in:
commit
76453ccfa5
@ -314,7 +314,7 @@ esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf)
|
||||
ESP_LOGE(LEDC_TAG, "invalid timer #%u", timer_num);
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
return ledc_set_timer_div(timer_num, timer_num, timer_conf->clk_cfg, freq_hz, duty_resolution);
|
||||
return ledc_set_timer_div(speed_mode, timer_num, timer_conf->clk_cfg, freq_hz, duty_resolution);
|
||||
}
|
||||
|
||||
esp_err_t ledc_set_pin(int gpio_num, ledc_mode_t speed_mode, ledc_channel_t ledc_channel)
|
||||
|
@ -57,7 +57,7 @@ static void produce_pulse(void)
|
||||
.freq_hz = 1,
|
||||
.clk_cfg = LEDC_AUTO_CLK,
|
||||
};
|
||||
ledc_timer_config(&ledc_timer);
|
||||
ESP_ERROR_CHECK(ledc_timer_config(&ledc_timer));
|
||||
|
||||
ledc_channel_config_t ledc_channel = {
|
||||
.speed_mode = LEDC_HIGH_SPEED_MODE,
|
||||
@ -68,7 +68,7 @@ static void produce_pulse(void)
|
||||
.duty = 100,
|
||||
.hpoint = 0,
|
||||
};
|
||||
ledc_channel_config(&ledc_channel);
|
||||
ESP_ERROR_CHECK(ledc_channel_config(&ledc_channel));
|
||||
}
|
||||
|
||||
static void IRAM_ATTR pcnt_intr_handler(void *arg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user