Type Alias rp2040_pac::usbctrl_regs::sie_status::R

source ·
pub type R = R<SIE_STATUS_SPEC>;
Expand description

Register SIE_STATUS reader

Aliased Type§

struct R { /* private fields */ }

Implementations§

source§

impl R

source

pub fn vbus_detected(&self) -> VBUS_DETECTED_R

Bit 0 - Device: VBUS Detected

source

pub fn line_state(&self) -> LINE_STATE_R

Bits 2:3 - USB bus line state

source

pub fn suspended(&self) -> SUSPENDED_R

Bit 4 - Bus in suspended state. Valid for device and host. Host and device will go into suspend if neither Keep Alive / SOF frames are enabled.

source

pub fn speed(&self) -> SPEED_R

Bits 8:9 - Host: device speed. Disconnected = 00, LS = 01, FS = 10

source

pub fn vbus_over_curr(&self) -> VBUS_OVER_CURR_R

Bit 10 - VBUS over current detected

source

pub fn resume(&self) -> RESUME_R

Bit 11 - Host: Device has initiated a remote resume. Device: host has initiated a resume.

source

pub fn connected(&self) -> CONNECTED_R

Bit 16 - Device: connected

source

pub fn setup_rec(&self) -> SETUP_REC_R

Bit 17 - Device: Setup packet received

source

pub fn trans_complete(&self) -> TRANS_COMPLETE_R

Bit 18 - 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
source

pub fn bus_reset(&self) -> BUS_RESET_R

Bit 19 - Device: bus reset received

source

pub fn crc_error(&self) -> CRC_ERROR_R

Bit 24 - CRC Error. Raised by the Serial RX engine.

source

pub fn bit_stuff_error(&self) -> BIT_STUFF_ERROR_R

Bit 25 - Bit Stuff Error. Raised by the Serial RX engine.

source

pub fn rx_overflow(&self) -> RX_OVERFLOW_R

Bit 26 - RX overflow is raised by the Serial RX engine if the incoming data is too fast.

source

pub fn rx_timeout(&self) -> RX_TIMEOUT_R

Bit 27 - 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.

source

pub fn nak_rec(&self) -> NAK_REC_R

Bit 28 - Host: NAK received

source

pub fn stall_rec(&self) -> STALL_REC_R

Bit 29 - Host: STALL received

source

pub fn ack_rec(&self) -> ACK_REC_R

Bit 30 - ACK received. Raised by both host and device.

source

pub fn data_seq_error(&self) -> DATA_SEQ_ERROR_R

Bit 31 - 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