Struct stm32_metapac::usb::regs::Cntr

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

control register

Tuple Fields§

§0: u32

Implementations§

§

impl Cntr

pub const fn fres(&self) -> bool

Force a reset of the USB peripheral, exactly like a RESET signaling on the USB

pub fn set_fres(&mut self, val: bool)

Force a reset of the USB peripheral, exactly like a RESET signaling on the USB

pub const fn pdwn(&self) -> bool

Enter power down mode

pub fn set_pdwn(&mut self, val: bool)

Enter power down mode

pub const fn lpmode(&self) -> bool

Enter low-power mode

pub fn set_lpmode(&mut self, val: bool)

Enter low-power mode

pub const fn fsusp(&self) -> bool

Enter suspend mode. Clocks and static power dissipation in the analog transceiver are left unaffected

pub fn set_fsusp(&mut self, val: bool)

Enter suspend mode. Clocks and static power dissipation in the analog transceiver are left unaffected

pub const fn resume(&self) -> bool

Resume request

pub fn set_resume(&mut self, val: bool)

Resume request

pub const fn esofm(&self) -> bool

ESOF Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_esofm(&mut self, val: bool)

ESOF Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn sofm(&self) -> bool

SOF Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_sofm(&mut self, val: bool)

SOF Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn resetm(&self) -> bool

RESET Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_resetm(&mut self, val: bool)

RESET Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn suspm(&self) -> bool

SUSP Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_suspm(&mut self, val: bool)

SUSP Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn wkupm(&self) -> bool

WKUP Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_wkupm(&mut self, val: bool)

WKUP Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn errm(&self) -> bool

ERR Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_errm(&mut self, val: bool)

ERR Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn pmaovrm(&self) -> bool

PMAOVR Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_pmaovrm(&mut self, val: bool)

PMAOVR Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub const fn ctrm(&self) -> bool

CTR Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

pub fn set_ctrm(&mut self, val: bool)

CTR Interrupt enabled, an interrupt request is generated when the corresponding bit in the USB_ISTR register is set

Trait Implementations§

§

impl Clone for Cntr

§

fn clone(&self) -> Cntr

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
§

impl Default for Cntr

§

fn default() -> Cntr

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

impl PartialEq for Cntr

§

fn eq(&self, other: &Cntr) -> 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.
§

impl Copy for Cntr

§

impl Eq for Cntr

§

impl StructuralPartialEq for Cntr

Auto Trait Implementations§

§

impl Freeze for Cntr

§

impl RefUnwindSafe for Cntr

§

impl Send for Cntr

§

impl Sync for Cntr

§

impl Unpin for Cntr

§

impl UnwindSafe for Cntr

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

§

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

§

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.