diff options
| author | xoviat <[email protected]> | 2025-12-13 08:58:35 -0600 |
|---|---|---|
| committer | xoviat <[email protected]> | 2025-12-13 08:58:35 -0600 |
| commit | c856626ee56bed0f3e2c4d4f5b745dbd378d7d3c (patch) | |
| tree | 5111de26c6d056b60dff16c6e6c44eca1d11a67e /embassy-stm32/src | |
| parent | a8de273d61f7bfa6f521dc53f41ed419f8cdc463 (diff) | |
adc: fix nonvolatile read
closes #5057
Diffstat (limited to 'embassy-stm32/src')
| -rw-r--r-- | embassy-stm32/src/adc/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/adc/mod.rs b/embassy-stm32/src/adc/mod.rs index a6af1175a..da432f6ce 100644 --- a/embassy-stm32/src/adc/mod.rs +++ b/embassy-stm32/src/adc/mod.rs | |||
| @@ -208,7 +208,7 @@ impl<'d, T: Instance> Adc<'d, T> { | |||
| 208 | T::regs().enable(); | 208 | T::regs().enable(); |
| 209 | T::regs().convert(); | 209 | T::regs().convert(); |
| 210 | 210 | ||
| 211 | unsafe { *T::regs().data() } | 211 | unsafe { core::ptr::read_volatile(T::regs().data()) } |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | #[cfg(any(adc_g4, adc_v3, adc_g0, adc_h5, adc_h7rs, adc_u0, adc_v4, adc_u5, adc_wba, adc_c0))] | 214 | #[cfg(any(adc_g4, adc_v3, adc_g0, adc_h5, adc_h7rs, adc_u0, adc_v4, adc_u5, adc_wba, adc_c0))] |
