ledc clk name change in esp-idf master (#208)

This commit is contained in:
Ronen Ulanovsky 2023-02-01 12:41:38 +02:00 committed by GitHub
parent 967f96a6a1
commit 423ab99fab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,10 @@ impl<'d> LedcTimerDriver<'d> {
#[cfg(not(esp_idf_version_major = "4"))]
duty_resolution: config.resolution.timer_bits(),
freq_hz: config.frequency.into(),
#[cfg(any(esp_idf_version_major = "4", esp_idf_version_minor = "0"))]
clk_cfg: ledc_clk_cfg_t_LEDC_AUTO_CLK,
#[cfg(not(any(esp_idf_version_major = "4", esp_idf_version_minor = "0")))]
clk_cfg: soc_periph_ledc_clk_src_legacy_t_LEDC_AUTO_CLK,
};
// SAFETY: We own the instance and therefor are safe to configure it.