stm32-metapac

Crates

git

Versions

stm32l052r6

Flavors

Skip to main content

Csr1

Struct Csr1 

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

COMP1 control and status register.

Tuple Fields§

§0: u32

Implementations§

§

impl Csr1

pub const fn en(&self) -> bool

COMP1 enable bit.

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

COMP1 enable bit.

pub const fn innsel(&self) -> Comp1Innsel

COMP1 input minus selection.

pub const fn set_innsel(&mut self, val: Comp1Innsel)

COMP1 input minus selection.

pub const fn wm(&self) -> bool

COMP1 window mode selection bit.

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

COMP1 window mode selection bit.

pub const fn lptimin1(&self) -> bool

COMP1 LPTIM1 input 1 propagation bit.

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

COMP1 LPTIM1 input 1 propagation bit.

pub const fn polarity(&self) -> Polarity

COMP1 output polarity selection bit.

pub const fn set_polarity(&mut self, val: Polarity)

COMP1 output polarity selection bit.

pub const fn value(&self) -> bool

COMP1 output status bit.

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

COMP1 output status bit.

pub const fn lock(&self) -> bool

COMP1_CSR register lock bit.

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

COMP1_CSR register lock bit.

Trait Implementations§

§

impl Clone for Csr1

§

fn clone(&self) -> Csr1

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 Csr1

§

impl Default for Csr1

§

fn default() -> Csr1

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

impl Eq for Csr1

§

impl PartialEq for Csr1

§

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

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

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

Inequality operator !=. Read more
§

impl StructuralPartialEq for Csr1

Auto Trait Implementations§

§

impl Freeze for Csr1

§

impl RefUnwindSafe for Csr1

§

impl Send for Csr1

§

impl Sync for Csr1

§

impl Unpin for Csr1

§

impl UnsafeUnpin for Csr1

§

impl UnwindSafe for Csr1

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.