[][src]Enum stm32f0xx_hal::adc::AdcAlign

pub enum AdcAlign {
    Left,
    Right,
    LeftAsRM,
}

ADC Result Alignment

Variants

Left

Left aligned results (most significant bits)

Results in all precisions returning a value in the range 0-65535. Depending on the precision the result will step by larger or smaller amounts.

Right

Right aligned results (least significant bits)

Results in all precisions returning values from 0-(2^bits-1) in steps of 1.

LeftAsRM

Left aligned results without correction of 6bit values.

Returns left aligned results exactly as shown in RM0091 Fig.37. Where the values are left aligned within the u16, with the exception of 6 bit mode where the value is left aligned within the first byte of the u16.

Implementations

impl AdcAlign[src]

pub fn default() -> Self[src]

Get the default alignment (currently right aligned)

Trait Implementations

impl Clone for AdcAlign[src]

impl Copy for AdcAlign[src]

impl Debug for AdcAlign[src]

impl From<AdcAlign> for ALIGN_A[src]

impl PartialEq<AdcAlign> for AdcAlign[src]

impl StructuralPartialEq for AdcAlign[src]

Auto Trait Implementations

impl Send for AdcAlign

impl Sync for AdcAlign

impl Unpin for AdcAlign

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.