Enum SampleTime

Source
pub enum SampleTime {
    Cycles1C5,
    Cycles2C5,
    Cycles4C5,
    Cycles7C5,
    Cycles19C5,
    Cycles61C5,
    Cycles181C5,
    Cycles601C5,
}
Expand description

ADC sampling time

Each channel can be sampled with a different sample time. There is always an overhead of 13 ADC clock cycles.

E.g. For SampleTime::T19C5 the total conversion time (in ADC clock cycles) is 13 + 19 = 32 ADC Clock Cycles

§Note

Currently, no way to set the specific clock of the Adc is implemented. By default the Adc peripheral is clocked by the Clock::pllclk, and will fall back to using the Clock::pllclk, if that is not set.

Variants§

§

Cycles1C5

1.5 ADC clock cycles

§

Cycles2C5

2.5 ADC clock cycles

§

Cycles4C5

4.5 ADC clock cycles

§

Cycles7C5

7.5 ADC clock cycles

§

Cycles19C5

19.5 ADC clock cycles

§

Cycles61C5

61.5 ADC clock cycles

§

Cycles181C5

181.5 ADC clock cycles

§

Cycles601C5

601.5 ADC clock cycles

Trait Implementations§

Source§

impl Clone for SampleTime

Source§

fn clone(&self) -> SampleTime

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SampleTime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SampleTime

Source§

fn default() -> Self

SampleTime::Cycles1C5 is also the reset value.

Source§

impl From<SMP10_A> for SampleTime

Source§

fn from(t: SMP10_A) -> Self

Converts to this type from the input type.
Source§

impl From<SMP1_A> for SampleTime

Source§

fn from(t: SMP1_A) -> Self

Converts to this type from the input type.
Source§

impl From<SampleTime> for SMP10_A

Source§

fn from(t: SampleTime) -> Self

Converts to this type from the input type.
Source§

impl From<SampleTime> for SMP1_A

Source§

fn from(t: SampleTime) -> Self

Converts to this type from the input type.
Source§

impl From<SampleTime> for f32

Source§

fn from(t: SampleTime) -> Self

Converts to this type from the input type.
Source§

impl From<SampleTime> for u16

Source§

fn from(t: SampleTime) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SampleTime

Source§

fn eq(&self, other: &SampleTime) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SampleTime

Source§

impl Eq for SampleTime

Source§

impl StructuralPartialEq for SampleTime

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.