pub struct VoltageInternalReference<ADC> { /* private fields */ }
Expand description
Internal voltage reference, which is also used for calibration.
Implementations§
Source§impl<Common> VoltageInternalReference<Common>where
Common: CommonInstance,
impl<Common> VoltageInternalReference<Common>where
Common: CommonInstance,
Sourcepub fn new(
common_adc: &mut CommonAdc<Common>,
_adcs: &mut <Common as CommonInstance>::Childs,
) -> Self
pub fn new( common_adc: &mut CommonAdc<Common>, _adcs: &mut <Common as CommonInstance>::Childs, ) -> Self
Creating a type associated with the special ADC sensor, which
implements the embedded_hal::adc::Channel
trait.
§Example
Imagine you’d like to measure the core temperature via ADC1
.
In that case this function takes both the common ADC, e.g. pac::ADC1_2
, as
well as both associated ADCs, e.g. pac::ADC1
& pac::ADC2
to ensure,
that these ADCs are still disabled, because the internal ADC sensor can only be
enabled, if these ADCs are disabled, see RM0316 15.6.2.
Code example can be seen in examples/adc.rs.
Trait Implementations§
Auto Trait Implementations§
impl<ADC> Freeze for VoltageInternalReference<ADC>
impl<ADC> RefUnwindSafe for VoltageInternalReference<ADC>where
ADC: RefUnwindSafe,
impl<ADC> Send for VoltageInternalReference<ADC>where
ADC: Send,
impl<ADC> Sync for VoltageInternalReference<ADC>where
ADC: Sync,
impl<ADC> Unpin for VoltageInternalReference<ADC>where
ADC: Unpin,
impl<ADC> UnwindSafe for VoltageInternalReference<ADC>where
ADC: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more