Struct stm32_metapac::usb::regs::Fnr
#[repr(transparent)]pub struct Fnr(pub u32);
Expand description
frame number register
Tuple Fields§
§0: u32
Implementations§
§impl Fnr
impl Fnr
pub const fn fn_(&self) -> u16
pub const fn fn_(&self) -> u16
Frame number This bit field contains the 11-bits frame number contained in the last received SOF packet. The frame number is incremented for every frame sent by the host and it is useful for Isochronous transfers. This bit field is updated on the generation of an SOF interrupt.
pub fn set_fn_(&mut self, val: u16)
pub fn set_fn_(&mut self, val: u16)
Frame number This bit field contains the 11-bits frame number contained in the last received SOF packet. The frame number is incremented for every frame sent by the host and it is useful for Isochronous transfers. This bit field is updated on the generation of an SOF interrupt.
pub const fn lsof(&self) -> u8
pub const fn lsof(&self) -> u8
Lost SOF Device mode These bits are written by the hardware when an ESOF interrupt is generated, counting the number of consecutive SOF packets lost. At the reception of an SOF packet, these bits are cleared.
pub fn set_lsof(&mut self, val: u8)
pub fn set_lsof(&mut self, val: u8)
Lost SOF Device mode These bits are written by the hardware when an ESOF interrupt is generated, counting the number of consecutive SOF packets lost. At the reception of an SOF packet, these bits are cleared.
pub const fn lck(&self) -> bool
pub const fn lck(&self) -> bool
Locked Device mode This bit is set by the hardware when at least two consecutive SOF packets have been received after the end of an USB reset condition or after the end of an USB resume sequence. Once locked, the frame timer remains in this state until an USB reset or USB suspend event occurs.
pub fn set_lck(&mut self, val: bool)
pub fn set_lck(&mut self, val: bool)
Locked Device mode This bit is set by the hardware when at least two consecutive SOF packets have been received after the end of an USB reset condition or after the end of an USB resume sequence. Once locked, the frame timer remains in this state until an USB reset or USB suspend event occurs.
pub const fn rxdm(&self) -> bool
pub const fn rxdm(&self) -> bool
Receive data - line status This bit can be used to observe the status of received data minus upstream port data line. It can be used during end-of-suspend routines to help determining the wakeup event.
pub fn set_rxdm(&mut self, val: bool)
pub fn set_rxdm(&mut self, val: bool)
Receive data - line status This bit can be used to observe the status of received data minus upstream port data line. It can be used during end-of-suspend routines to help determining the wakeup event.