Ch

Enum 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 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 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

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 Ch

Source§

impl Eq for Ch

Source§

impl StructuralPartialEq for Ch

Auto Trait Implementations§

§

impl Freeze for Ch

§

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 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.