aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/adc/mod.rs
diff options
context:
space:
mode:
authorxoviat <[email protected]>2025-11-10 12:49:23 -0600
committerxoviat <[email protected]>2025-11-10 12:49:23 -0600
commitff1fb2dd6b9ebc0dd3c7b642f70fbb80a1fd030d (patch)
tree96db68cbfd7c17c019795763e186c982547d2faf /embassy-stm32/src/adc/mod.rs
parentc90e4b3135283070bddc6a8e64df3139909ac8ce (diff)
adc: exact cal
Diffstat (limited to 'embassy-stm32/src/adc/mod.rs')
-rw-r--r--embassy-stm32/src/adc/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/embassy-stm32/src/adc/mod.rs b/embassy-stm32/src/adc/mod.rs
index a5ca6277f..3bf893a35 100644
--- a/embassy-stm32/src/adc/mod.rs
+++ b/embassy-stm32/src/adc/mod.rs
@@ -123,6 +123,14 @@ impl<T: Instance + VrefConverter> SealedAdcChannel<T> for VrefInt {
123 } 123 }
124} 124}
125 125
126impl VrefInt {
127 #[cfg(any(adc_f3v1, adc_f3v2))]
128 /// The value that vref would be if vdda was at 3300mv
129 pub fn calibrated_value(&self) -> u16 {
130 crate::pac::VREFINTCAL.data().read()
131 }
132}
133
126/// Internal temperature channel. 134/// Internal temperature channel.
127pub struct Temperature; 135pub struct Temperature;
128impl<T: Instance + TemperatureConverter> AdcChannel<T> for Temperature {} 136impl<T: Instance + TemperatureConverter> AdcChannel<T> for Temperature {}