#[repr(transparent)]pub struct SieStatus(pub u32);
Expand description
SIE status register
Tuple Fields§
§0: u32
Implementations§
source§impl SieStatus
impl SieStatus
sourcepub const fn vbus_detected(&self) -> bool
pub const fn vbus_detected(&self) -> bool
Device: VBUS Detected
sourcepub fn set_vbus_detected(&mut self, val: bool)
pub fn set_vbus_detected(&mut self, val: bool)
Device: VBUS Detected
sourcepub const fn line_state(&self) -> u8
pub const fn line_state(&self) -> u8
USB bus line state
sourcepub fn set_line_state(&mut self, val: u8)
pub fn set_line_state(&mut self, val: u8)
USB bus line state
sourcepub const fn suspended(&self) -> bool
pub const fn suspended(&self) -> bool
Bus in suspended state. Valid for device and host. Host and device will go into suspend if neither Keep Alive / SOF frames are enabled.
sourcepub fn set_suspended(&mut self, val: bool)
pub fn set_suspended(&mut self, val: bool)
Bus in suspended state. Valid for device and host. Host and device will go into suspend if neither Keep Alive / SOF frames are enabled.
sourcepub const fn vbus_over_curr(&self) -> bool
pub const fn vbus_over_curr(&self) -> bool
VBUS over current detected
sourcepub fn set_vbus_over_curr(&mut self, val: bool)
pub fn set_vbus_over_curr(&mut self, val: bool)
VBUS over current detected
sourcepub const fn resume(&self) -> bool
pub const fn resume(&self) -> bool
Host: Device has initiated a remote resume. Device: host has initiated a resume.
sourcepub fn set_resume(&mut self, val: bool)
pub fn set_resume(&mut self, val: bool)
Host: Device has initiated a remote resume. Device: host has initiated a resume.
sourcepub fn set_connected(&mut self, val: bool)
pub fn set_connected(&mut self, val: bool)
Device: connected
sourcepub fn set_setup_rec(&mut self, val: bool)
pub fn set_setup_rec(&mut self, val: bool)
Device: Setup packet received
sourcepub const fn trans_complete(&self) -> bool
pub const fn trans_complete(&self) -> bool
Transaction complete. Raised by device if: * An IN or OUT packet is sent with the LAST_BUFF
bit set in the buffer control register Raised by host if: * A setup packet is sent when no data in or data out transaction follows * An IN packet is received and the LAST_BUFF
bit is set in the buffer control register * An IN packet is received with zero length * An OUT packet is sent and the LAST_BUFF
bit is set
sourcepub fn set_trans_complete(&mut self, val: bool)
pub fn set_trans_complete(&mut self, val: bool)
Transaction complete. Raised by device if: * An IN or OUT packet is sent with the LAST_BUFF
bit set in the buffer control register Raised by host if: * A setup packet is sent when no data in or data out transaction follows * An IN packet is received and the LAST_BUFF
bit is set in the buffer control register * An IN packet is received with zero length * An OUT packet is sent and the LAST_BUFF
bit is set
sourcepub fn set_bus_reset(&mut self, val: bool)
pub fn set_bus_reset(&mut self, val: bool)
Device: bus reset received
sourcepub fn set_crc_error(&mut self, val: bool)
pub fn set_crc_error(&mut self, val: bool)
CRC Error. Raised by the Serial RX engine.
sourcepub const fn bit_stuff_error(&self) -> bool
pub const fn bit_stuff_error(&self) -> bool
Bit Stuff Error. Raised by the Serial RX engine.
sourcepub fn set_bit_stuff_error(&mut self, val: bool)
pub fn set_bit_stuff_error(&mut self, val: bool)
Bit Stuff Error. Raised by the Serial RX engine.
sourcepub const fn rx_overflow(&self) -> bool
pub const fn rx_overflow(&self) -> bool
RX overflow is raised by the Serial RX engine if the incoming data is too fast.
sourcepub fn set_rx_overflow(&mut self, val: bool)
pub fn set_rx_overflow(&mut self, val: bool)
RX overflow is raised by the Serial RX engine if the incoming data is too fast.
sourcepub const fn rx_timeout(&self) -> bool
pub const fn rx_timeout(&self) -> bool
RX timeout is raised by both the host and device if an ACK is not received in the maximum time specified by the USB spec.
sourcepub fn set_rx_timeout(&mut self, val: bool)
pub fn set_rx_timeout(&mut self, val: bool)
RX timeout is raised by both the host and device if an ACK is not received in the maximum time specified by the USB spec.
sourcepub fn set_nak_rec(&mut self, val: bool)
pub fn set_nak_rec(&mut self, val: bool)
Host: NAK received
sourcepub fn set_stall_rec(&mut self, val: bool)
pub fn set_stall_rec(&mut self, val: bool)
Host: STALL received
sourcepub fn set_ack_rec(&mut self, val: bool)
pub fn set_ack_rec(&mut self, val: bool)
ACK received. Raised by both host and device.
sourcepub const fn data_seq_error(&self) -> bool
pub const fn data_seq_error(&self) -> bool
Data Sequence Error. The device can raise a sequence error in the following conditions: * A SETUP packet is received followed by a DATA1 packet (data phase should always be DATA0) * An OUT packet is received from the host but doesn’t match the data pid in the buffer control register read from DPSRAM The host can raise a data sequence error in the following conditions: * An IN packet from the device has the wrong data PID
sourcepub fn set_data_seq_error(&mut self, val: bool)
pub fn set_data_seq_error(&mut self, val: bool)
Data Sequence Error. The device can raise a sequence error in the following conditions: * A SETUP packet is received followed by a DATA1 packet (data phase should always be DATA0) * An OUT packet is received from the host but doesn’t match the data pid in the buffer control register read from DPSRAM The host can raise a data sequence error in the following conditions: * An IN packet from the device has the wrong data PID
Trait Implementations§
impl Copy for SieStatus
impl Eq for SieStatus
impl StructuralPartialEq for SieStatus
Auto Trait Implementations§
impl Freeze for SieStatus
impl RefUnwindSafe for SieStatus
impl Send for SieStatus
impl Sync for SieStatus
impl Unpin for SieStatus
impl UnwindSafe for SieStatus
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
)