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 helper trait to do calibrated samples fitting

Required Methods§

source

fn new_cal(atten: Attenuation) -> Self

Instantiate scheme

Provided Methods§

source

fn adc_cal(&self) -> u16

Get ADC calibration value to set to ADC unit

source

fn adc_val(&self, val: u16) -> u16

Convert ADC value

Implementations on Foreign Types§

source§

impl<ADCI> AdcCalScheme<ADCI> for ()

Implementors§

source§

impl<ADCI> AdcCalScheme<ADCI> for AdcCalBasic<ADCI>where ADCI: AdcCalEfuse + RegisterAccess,

source§

impl<ADCI> AdcCalScheme<ADCI> for AdcCalCurve<ADCI>where ADCI: AdcCalEfuse + AdcHasLineCal + AdcHasCurveCal + RegisterAccess,

source§

impl<ADCI> AdcCalScheme<ADCI> for AdcCalLine<ADCI>where ADCI: AdcCalEfuse + AdcHasLineCal + RegisterAccess,