#[non_exhaustive]pub enum Error {
ChannelNotConfigured(u8),
Adc2InUse,
MissingCalibrationData,
UnsupportedAttenuation(Attenuation),
}unstable only.Expand description
Errors that can occur while using the ADC.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ChannelNotConfigured(u8)
The ADC channel was not configured for reading.
Adc2InUse
ADC2 cannot be used together with the radio.
Only constructed on ESP32, where ADC2 shares hardware with Wi-Fi and
Bluetooth.
MissingCalibrationData
The chip carries no eFuse calibration data for the requested scheme.
Constructed when line/curve fitting is requested but the calibration eFuses are unburnt, or when the stored reference point is zero and therefore unusable.
UnsupportedAttenuation(Attenuation)
The attenuation has no calibration reference point on this chip.
Constructed when the requested attenuation is not characterized for calibration (e.g. ESP32-C2 line fitting at 2.5 dB/6 dB, or a missing curve-fitting coefficient set).
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)