Skip to content

Commit

Permalink
esp32c6 can use the PLL160M clock actually
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Oct 18, 2023
1 parent fcfd077 commit 83674fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.42.1] - 2023-10-18
* Fix ambiguous name error #325 - a compilation issue when the NimBLE component is enabled in `esp-idf-sys`
* Fix compilation issues of the I2S driver for esp32h2, esp32c2 and esp32c6
* Fix compilation issues of the I2S driver for esp32h2 and esp32c2
* Fix compilation issues of the ADC drivers when the ESP IDF `esp_adc` component is not enabled
* Fix compilation issues of the GPIO driver for esp32c6

Expand Down
8 changes: 4 additions & 4 deletions src/i2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub mod config {
#[derive(Clone, Copy, Debug, Eq, PartialEq, Default)]
pub enum ClockSource {
/// Use PLL_F160M as the source clock
#[cfg(not(any(esp32h2, esp32c2, esp32c6)))]
#[cfg(not(any(esp32h2, esp32c2)))]
#[default]
Pll160M,

Expand All @@ -105,7 +105,7 @@ pub mod config {
Pll60M,

/// Use PLL_F64M as the source clock
#[cfg(any(esp32h2, esp32c6))]
#[cfg(esp32h2)]
#[default]
Pll64M,

Expand All @@ -119,7 +119,7 @@ pub mod config {
#[allow(clippy::unnecessary_cast)]
pub(super) fn as_sdk(&self) -> i2s_clock_src_t {
match self {
#[cfg(not(any(esp32h2, esp32c2, esp32c6)))]
#[cfg(not(any(esp32h2, esp32c2)))]
Self::Pll160M => core::convert::TryInto::try_into(
esp_idf_sys::soc_module_clk_t_SOC_MOD_CLK_PLL_F160M,
)
Expand All @@ -129,7 +129,7 @@ pub mod config {
esp_idf_sys::soc_module_clk_t_SOC_MOD_CLK_PLL_F60M,
)
.unwrap(),
#[cfg(any(esp32h2, esp32c6))]
#[cfg(esp32h2)]
Self::Pll64M => core::convert::TryInto::try_into(
esp_idf_sys::soc_module_clk_t_SOC_MOD_CLK_PLL_F64M,
)
Expand Down

0 comments on commit 83674fb

Please sign in to comment.