Struct esp32c2_hal::analog::adc::AdcConfig
source · pub struct AdcConfig<ADCI> {
pub resolution: Resolution,
pub attenuations: [Option<Attenuation>; 5],
/* private fields */
}
Fields§
§resolution: Resolution
§attenuations: [Option<Attenuation>; 5]
Implementations§
source§impl<ADCI> AdcConfig<ADCI>where
ADCI: RegisterAccess,
impl<ADCI> AdcConfig<ADCI>where ADCI: RegisterAccess,
pub fn new() -> AdcConfig<ADCI>
pub fn enable_pin<PIN>( &mut self, pin: PIN, attenuation: Attenuation ) -> AdcPin<PIN, ADCI>where PIN: Channel<ADCI, ID = u8>,
pub fn enable_pin_with_cal<PIN, CS>( &mut self, pin: PIN, attenuation: Attenuation ) -> AdcPin<PIN, ADCI, CS>where ADCI: CalibrationAccess, PIN: Channel<ADCI, ID = u8>, CS: AdcCalScheme<ADCI>,
sourcepub fn adc_calibrate(atten: Attenuation, source: AdcCalSource) -> u16where
ADCI: CalibrationAccess,
pub fn adc_calibrate(atten: Attenuation, source: AdcCalSource) -> u16where ADCI: CalibrationAccess,
Calibrate ADC with specified attenuation and voltage source
Trait Implementations§
Auto Trait Implementations§
impl<ADCI> RefUnwindSafe for AdcConfig<ADCI>where ADCI: RefUnwindSafe,
impl<ADCI> Send for AdcConfig<ADCI>where ADCI: Send,
impl<ADCI> Sync for AdcConfig<ADCI>where ADCI: Sync,
impl<ADCI> Unpin for AdcConfig<ADCI>where ADCI: Unpin,
impl<ADCI> UnwindSafe for AdcConfig<ADCI>where ADCI: 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