diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index e356f9197..ea76183d7 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- ESP32: ADC1 readings are no longer inverted (#4423) ### Removed diff --git a/esp-hal/src/analog/adc/esp32.rs b/esp-hal/src/analog/adc/esp32.rs index 424aa802d..d49da470e 100644 --- a/esp-hal/src/analog/adc/esp32.rs +++ b/esp-hal/src/analog/adc/esp32.rs @@ -301,6 +301,9 @@ where // Do *not* invert the output // NOTE: This seems backwards, but was verified experimentally. + sensors + .sar_read_ctrl() + .modify(|_, w| w.sar1_data_inv().set_bit()); sensors .sar_read_ctrl2() .modify(|_, w| w.sar2_data_inv().set_bit());