Do not invert ADC readings when using ESP32 (#1093)

* Do not invert ADC readings when using ESP32

* Update `CHANGELOG.md`
This commit is contained in:
Jesse Braham 2024-01-19 07:13:27 +00:00 committed by GitHub
parent 99c46d6a4e
commit a5a58291e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix double &mut for the `SetDutyCycle` impl on `PwmPin` (#1033)
- ESP32/ESP32-S3: Fix stack-top calculation for app-core (#1081)
- ESP32/ESP32-S2/ESP32-S3: Fix embassy-time-timg0 driver (#1091)
- ESP32: ADC readings are no longer inverted (#1093)
### Removed

View File

@ -336,6 +336,12 @@ where
.sar_meas_wait2()
.modify(|_, w| unsafe { w.sar_amp_wait3().bits(1) });
// Do *not* invert the output
// NOTE: This seems backwards, but was verified experimentally.
sensors
.sar_read_ctrl2()
.modify(|_, w| w.sar2_data_inv().set_bit());
let adc = ADC {
_adc: adc_instance.into_ref(),
attenuations: config.attenuations,