stm32-metapac

Crates

git

Versions

stm32l151v8-a

Flavors

Skip to main content

Csr

Struct Csr 

#[repr(transparent)]
pub struct Csr(pub u32);
Expand description

COMP control and status register.

Tuple Fields§

§0: u32

Implementations§

§

impl Csr

pub const fn pu10k(&self) -> bool

10 kOhm pull-up resistor.

pub const fn set_pu10k(&mut self, val: bool)

10 kOhm pull-up resistor.

pub const fn pu400k(&self) -> bool

400 kOhm pull-up resistor.

pub const fn set_pu400k(&mut self, val: bool)

400 kOhm pull-up resistor.

pub const fn pd10k(&self) -> bool

10 kOhm pull-down resistor.

pub const fn set_pd10k(&mut self, val: bool)

10 kOhm pull-down resistor.

pub const fn pd400k(&self) -> bool

400 kOhm pull-down resistor.

pub const fn set_pd400k(&mut self, val: bool)

400 kOhm pull-down resistor.

pub const fn cmp1en(&self) -> bool

Comparator 1 enable.

pub const fn set_cmp1en(&mut self, val: bool)

Comparator 1 enable.

pub const fn sw1(&self) -> bool

COMP1_SW1 analog switch enable.

pub const fn set_sw1(&mut self, val: bool)

COMP1_SW1 analog switch enable.

pub const fn cmp1out(&self) -> bool

Comparator 1 output.

pub const fn set_cmp1out(&mut self, val: bool)

Comparator 1 output.

pub const fn speed(&self) -> Speed

Comparator 2 speed mode.

pub const fn set_speed(&mut self, val: Speed)

Comparator 2 speed mode.

pub const fn cmp2out(&self) -> bool

Comparator 2 output.

pub const fn set_cmp2out(&mut self, val: bool)

Comparator 2 output.

pub const fn vrefouten(&self) -> bool

VREFINT output enable.

pub const fn set_vrefouten(&mut self, val: bool)

VREFINT output enable.

pub const fn wndwe(&self) -> bool

Window mode enable.

pub const fn set_wndwe(&mut self, val: bool)

Window mode enable.

pub const fn insel(&self) -> Insel

Comparator 2 inverting input selection.

pub const fn set_insel(&mut self, val: Insel)

Comparator 2 inverting input selection.

pub const fn outsel(&self) -> Outsel

Comparator 2 output redirection.

pub const fn set_outsel(&mut self, val: Outsel)

Comparator 2 output redirection.

pub const fn fch3(&self) -> bool

Select GPIO port PA3 as fast ADC input channel CH3.

pub const fn set_fch3(&mut self, val: bool)

Select GPIO port PA3 as fast ADC input channel CH3.

pub const fn fch8(&self) -> bool

Select GPIO port PB0 as fast ADC input channel CH8.

pub const fn set_fch8(&mut self, val: bool)

Select GPIO port PB0 as fast ADC input channel CH8.

pub const fn rch13(&self) -> bool

Select GPIO port PC3 as re-routed ADC input channel CH13.

pub const fn set_rch13(&mut self, val: bool)

Select GPIO port PC3 as re-routed ADC input channel CH13.

pub const fn caie(&self) -> bool

Channel acquisition interrupt enable / clear.

pub const fn set_caie(&mut self, val: bool)

Channel acquisition interrupt enable / clear.

pub const fn caif(&self) -> bool

Channel acquisition interrupt flag.

pub const fn set_caif(&mut self, val: bool)

Channel acquisition interrupt flag.

pub const fn tsusp(&self) -> bool

Suspend Timer Mode.

pub const fn set_tsusp(&mut self, val: bool)

Suspend Timer Mode.

Trait Implementations§

§

impl Clone for Csr

§

fn clone(&self) -> Csr

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Copy for Csr

§

impl Default for Csr

§

fn default() -> Csr

Returns the “default value” for a type. Read more
§

impl Eq for Csr

§

impl PartialEq for Csr

§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
§

impl StructuralPartialEq for Csr

Auto Trait Implementations§

§

impl Freeze for Csr

§

impl RefUnwindSafe for Csr

§

impl Send for Csr

§

impl Sync for Csr

§

impl Unpin for Csr

§

impl UnsafeUnpin for Csr

§

impl UnwindSafe for Csr

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 = !

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.