Skip to content

Commit

Permalink
Explain Other(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Feb 4, 2025
1 parent 5e86590 commit 452539e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esp-hal/src/clock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl Clocks {
} else {
const {
match esp_config::esp_config_str!("ESP_HAL_CONFIG_XTAL_FREQUENCY").as_bytes() {
b"auto" => XtalClock::Other(0),
b"auto" => XtalClock::Other(0), // Can't be `unreachable!` due to const eval.
b"26" => XtalClock::_26M,
b"40" => XtalClock::_40M,
other => XtalClock::Other(esp_config::esp_config_int_parse!(u32, other)),
Expand Down Expand Up @@ -392,7 +392,7 @@ impl Clocks {
} else {
const {
match esp_config::esp_config_str!("ESP_HAL_CONFIG_XTAL_FREQUENCY").as_bytes() {
b"auto" => XtalClock::Other(0),
b"auto" => XtalClock::Other(0), // Can't be `unreachable!` due to const eval.
b"26" => XtalClock::_26M,
b"40" => XtalClock::_40M,
other => XtalClock::Other(esp_config::esp_config_int_parse!(u32, other)),
Expand Down

0 comments on commit 452539e

Please sign in to comment.