Enum stm32wlxx_hal::adc::Ch

source ·
#[repr(u8)]
pub enum Ch {
Show 16 variants In0 = 0, In1 = 1, In2 = 2, In3 = 3, In4 = 4, In5 = 5, In6 = 6, In7 = 7, In8 = 8, In9 = 9, In10 = 10, In11 = 11, Vts = 12, Vref = 13, Vbat = 14, Dac = 17,
}
Expand description

ADC channels

Variants§

§

In0 = 0

ADC input 0.

Connected to B13.

§

In1 = 1

ADC input 1.

Connected to B14.

§

In2 = 2

ADC input 2.

Connected to B3.

§

In3 = 3

ADC input 3.

Connected to B4.

§

In4 = 4

ADC input 4.

Connected to B2.

§

In5 = 5

ADC input 5.

Connected to B1.

§

In6 = 6

ADC input 6.

Connected to A10.

§

In7 = 7

ADC input 7.

Connected to A11.

§

In8 = 8

ADC input 8.

Connected to A12.

§

In9 = 9

ADC input 9.

Connected to A13.

§

In10 = 10

ADC input 10.

Connected to A14.

§

In11 = 11

ADC input 11.

Connected to A15.

§

Vts = 12

Junction temperature sensor.

§

Vref = 13

Internal voltage reference.

§

Vbat = 14

Battery voltage divided by 3.

§

Dac = 17

Digital to analog converter output.

The DAC outputs to this internal pin only when configured to output to chip peripherals.

Implementations§

source§

impl Ch

source

pub const fn mask(self) -> u32

Bitmask of the channel.

Example
use stm32wlxx_hal::adc::Ch;

assert_eq!(Ch::In0.mask(), 0x001);
assert_eq!(Ch::In8.mask(), 0x100);

Trait Implementations§

source§

impl Clone for Ch

source§

fn clone(&self) -> Ch

Returns a copy 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 Ch

source§

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

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

impl PartialEq for Ch

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Ch

source§

impl Eq for Ch

source§

impl StructuralEq for Ch

source§

impl StructuralPartialEq for Ch

Auto Trait Implementations§

§

impl RefUnwindSafe for Ch

§

impl Send for Ch

§

impl Sync for Ch

§

impl Unpin for Ch

§

impl UnwindSafe for Ch

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.