#[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