Trait esp32c2_hal::analog::AdcCalScheme
source · pub trait AdcCalScheme<ADCI>: Sized {
// Required method
fn new_cal(atten: Attenuation) -> Self;
// Provided methods
fn adc_cal(&self) -> u16 { ... }
fn adc_val(&self, val: u16) -> u16 { ... }
}
Expand description
A trait abstracting over calibration methods.
The methods in this trait are mostly for internal use. To get
calibrated ADC reads, all you need to do is call enable_pin_with_cal
and specify some implementor of this trait.
Required Methods§
sourcefn new_cal(atten: Attenuation) -> Self
fn new_cal(atten: Attenuation) -> Self
Create a new calibration scheme for the given attenuation.
Provided Methods§
sourcefn adc_cal(&self) -> u16
fn adc_cal(&self) -> u16
Return the basic ADC bias value. See adc::AdcCalBasic
for
details.
Object Safety§
This trait is not object safe.