Struct stm32_metapac::ucpd::regs::Sr
#[repr(transparent)]pub struct Sr(pub u32);
Expand description
status register
Tuple Fields§
§0: u32
Implementations§
§impl Sr
impl Sr
pub const fn txis(&self) -> bool
pub const fn txis(&self) -> bool
Transmit interrupt status The flag indicates that the TXDR register is empty and new data write is required (as the amount of data sent has not reached the payload size defined in the TXPAYSZ bitfield). The flag is cleared with the data write into the TXDR register.
pub fn set_txis(&mut self, val: bool)
pub fn set_txis(&mut self, val: bool)
Transmit interrupt status The flag indicates that the TXDR register is empty and new data write is required (as the amount of data sent has not reached the payload size defined in the TXPAYSZ bitfield). The flag is cleared with the data write into the TXDR register.
pub const fn txmsgdisc(&self) -> bool
pub const fn txmsgdisc(&self) -> bool
Message transmission discarded The flag indicates that a message transmission was dropped. The flag is cleared by setting the TXMSGDISCCF bit. Transmission of a message can be dropped if there is a concurrent receive in progress or at excessive noise on the line. After a Tx message is discarded, the flag is only raised when the CC line becomes idle.
pub fn set_txmsgdisc(&mut self, val: bool)
pub fn set_txmsgdisc(&mut self, val: bool)
Message transmission discarded The flag indicates that a message transmission was dropped. The flag is cleared by setting the TXMSGDISCCF bit. Transmission of a message can be dropped if there is a concurrent receive in progress or at excessive noise on the line. After a Tx message is discarded, the flag is only raised when the CC line becomes idle.
pub const fn txmsgsent(&self) -> bool
pub const fn txmsgsent(&self) -> bool
Message transmission completed The flag indicates the completion of packet transmission. It is cleared by setting the TXMSGSENTCF bit. In the event of a message transmission interrupted by a Hard Reset, the flag is not raised.
pub fn set_txmsgsent(&mut self, val: bool)
pub fn set_txmsgsent(&mut self, val: bool)
Message transmission completed The flag indicates the completion of packet transmission. It is cleared by setting the TXMSGSENTCF bit. In the event of a message transmission interrupted by a Hard Reset, the flag is not raised.
pub const fn txmsgabt(&self) -> bool
pub const fn txmsgabt(&self) -> bool
Transmit message abort The flag indicates that a Tx message is aborted due to a subsequent Hard Reset message send request taking priority during transmit. It is cleared by setting the TXMSGABTCF bit.
pub fn set_txmsgabt(&mut self, val: bool)
pub fn set_txmsgabt(&mut self, val: bool)
Transmit message abort The flag indicates that a Tx message is aborted due to a subsequent Hard Reset message send request taking priority during transmit. It is cleared by setting the TXMSGABTCF bit.
pub const fn hrstdisc(&self) -> bool
pub const fn hrstdisc(&self) -> bool
Hard Reset discarded The flag indicates that the Hard Reset message is discarded. The flag is cleared by setting the HRSTDISCCF bit.
pub fn set_hrstdisc(&mut self, val: bool)
pub fn set_hrstdisc(&mut self, val: bool)
Hard Reset discarded The flag indicates that the Hard Reset message is discarded. The flag is cleared by setting the HRSTDISCCF bit.
pub const fn hrstsent(&self) -> bool
pub const fn hrstsent(&self) -> bool
Hard Reset message sent The flag indicates that the Hard Reset message is sent. The flag is cleared by setting the HRSTSENTCF bit.
pub fn set_hrstsent(&mut self, val: bool)
pub fn set_hrstsent(&mut self, val: bool)
Hard Reset message sent The flag indicates that the Hard Reset message is sent. The flag is cleared by setting the HRSTSENTCF bit.
pub const fn txund(&self) -> bool
pub const fn txund(&self) -> bool
Tx data underrun detection The flag indicates that the Tx data register (TXDR) was not written in time for a transmit message to execute normally. It is cleared by setting the TXUNDCF bit.
pub fn set_txund(&mut self, val: bool)
pub fn set_txund(&mut self, val: bool)
Tx data underrun detection The flag indicates that the Tx data register (TXDR) was not written in time for a transmit message to execute normally. It is cleared by setting the TXUNDCF bit.
pub const fn rxne(&self) -> bool
pub const fn rxne(&self) -> bool
Receive data register not empty detection The flag indicates that the RXDR register is not empty. It is automatically cleared upon reading RXDR.
pub fn set_rxne(&mut self, val: bool)
pub fn set_rxne(&mut self, val: bool)
Receive data register not empty detection The flag indicates that the RXDR register is not empty. It is automatically cleared upon reading RXDR.
pub const fn rxorddet(&self) -> bool
pub const fn rxorddet(&self) -> bool
Rx ordered set (4 K-codes) detection The flag indicates the detection of an ordered set. The relevant information is stored in the RXORDSET[2:0] bitfield of the RX_ORDSET register. It is cleared by setting the RXORDDETCF bit.
pub fn set_rxorddet(&mut self, val: bool)
pub fn set_rxorddet(&mut self, val: bool)
Rx ordered set (4 K-codes) detection The flag indicates the detection of an ordered set. The relevant information is stored in the RXORDSET[2:0] bitfield of the RX_ORDSET register. It is cleared by setting the RXORDDETCF bit.
pub const fn rxhrstdet(&self) -> bool
pub const fn rxhrstdet(&self) -> bool
Rx Hard Reset receipt detection The flag indicates the receipt of valid Hard Reset message. It is cleared by setting the RXHRSTDETCF bit.
pub fn set_rxhrstdet(&mut self, val: bool)
pub fn set_rxhrstdet(&mut self, val: bool)
Rx Hard Reset receipt detection The flag indicates the receipt of valid Hard Reset message. It is cleared by setting the RXHRSTDETCF bit.
pub const fn rxovr(&self) -> bool
pub const fn rxovr(&self) -> bool
Rx data overflow detection The flag indicates Rx data buffer overflow. It is cleared by setting the RXOVRCF bit. The buffer overflow can occur if the received data are not read fast enough.
pub fn set_rxovr(&mut self, val: bool)
pub fn set_rxovr(&mut self, val: bool)
Rx data overflow detection The flag indicates Rx data buffer overflow. It is cleared by setting the RXOVRCF bit. The buffer overflow can occur if the received data are not read fast enough.
pub const fn rxmsgend(&self) -> bool
pub const fn rxmsgend(&self) -> bool
Rx message received The flag indicates whether a message (except Hard Reset message) has been received, regardless the CRC value. The flag is cleared by setting the RXMSGENDCF bit. The RXERR flag set when the RXMSGEND flag goes high indicates errors in the last-received message.
pub fn set_rxmsgend(&mut self, val: bool)
pub fn set_rxmsgend(&mut self, val: bool)
Rx message received The flag indicates whether a message (except Hard Reset message) has been received, regardless the CRC value. The flag is cleared by setting the RXMSGENDCF bit. The RXERR flag set when the RXMSGEND flag goes high indicates errors in the last-received message.
pub const fn rxerr(&self) -> bool
pub const fn rxerr(&self) -> bool
Receive message error The flag indicates errors of the last Rx message declared (via RXMSGEND), such as incorrect CRC or truncated message (a line becoming static before EOP is met). It is asserted whenever the RXMSGEND flag is set.
pub fn set_rxerr(&mut self, val: bool)
pub fn set_rxerr(&mut self, val: bool)
Receive message error The flag indicates errors of the last Rx message declared (via RXMSGEND), such as incorrect CRC or truncated message (a line becoming static before EOP is met). It is asserted whenever the RXMSGEND flag is set.
pub const fn typecevt1(&self) -> bool
pub const fn typecevt1(&self) -> bool
Type-C voltage level event on CC1 line The flag indicates a change of the TYPEC_VSTATE_CC1[1:0] bitfield value, which corresponds to a new Type-C event. It is cleared by setting the TYPECEVT2CF bit.
pub fn set_typecevt1(&mut self, val: bool)
pub fn set_typecevt1(&mut self, val: bool)
Type-C voltage level event on CC1 line The flag indicates a change of the TYPEC_VSTATE_CC1[1:0] bitfield value, which corresponds to a new Type-C event. It is cleared by setting the TYPECEVT2CF bit.
pub const fn typecevt2(&self) -> bool
pub const fn typecevt2(&self) -> bool
Type-C voltage level event on CC2 line The flag indicates a change of the TYPEC_VSTATE_CC2[1:0] bitfield value, which corresponds to a new Type-C event. It is cleared by setting the TYPECEVT2CF bit.
pub fn set_typecevt2(&mut self, val: bool)
pub fn set_typecevt2(&mut self, val: bool)
Type-C voltage level event on CC2 line The flag indicates a change of the TYPEC_VSTATE_CC2[1:0] bitfield value, which corresponds to a new Type-C event. It is cleared by setting the TYPECEVT2CF bit.
pub const fn typec_vstate_cc1(&self) -> TypecVstateCc
pub const fn typec_vstate_cc1(&self) -> TypecVstateCc
The status bitfield indicates the voltage level on the CC1 line in its steady state. The voltage variation on the CC1 line during USB PD messages due to the BMC PHY modulation does not impact the bitfield value.
pub fn set_typec_vstate_cc1(&mut self, val: TypecVstateCc)
pub fn set_typec_vstate_cc1(&mut self, val: TypecVstateCc)
The status bitfield indicates the voltage level on the CC1 line in its steady state. The voltage variation on the CC1 line during USB PD messages due to the BMC PHY modulation does not impact the bitfield value.
pub const fn typec_vstate_cc2(&self) -> TypecVstateCc
pub const fn typec_vstate_cc2(&self) -> TypecVstateCc
CC2 line voltage level The status bitfield indicates the voltage level on the CC2 line in its steady state. The voltage variation on the CC2 line during USB PD messages due to the BMC PHY modulation does not impact the bitfield value.
pub fn set_typec_vstate_cc2(&mut self, val: TypecVstateCc)
pub fn set_typec_vstate_cc2(&mut self, val: TypecVstateCc)
CC2 line voltage level The status bitfield indicates the voltage level on the CC2 line in its steady state. The voltage variation on the CC2 line during USB PD messages due to the BMC PHY modulation does not impact the bitfield value.
pub const fn frsevt(&self) -> bool
pub const fn frsevt(&self) -> bool
FRS detection event The flag is cleared by setting the FRSEVTCF bit.
pub fn set_frsevt(&mut self, val: bool)
pub fn set_frsevt(&mut self, val: bool)
FRS detection event The flag is cleared by setting the FRSEVTCF bit.
Trait Implementations§
impl Copy for Sr
impl Eq for Sr
impl StructuralPartialEq for Sr
Auto Trait Implementations§
impl Freeze for Sr
impl RefUnwindSafe for Sr
impl Send for Sr
impl Sync for Sr
impl Unpin for Sr
impl UnwindSafe for Sr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)