Embassy
rp-pac

Crates

git

Versions

default

Flavors

Struct rp_pac::usb::regs::SieStatus

source ·
#[repr(transparent)]
pub struct SieStatus(pub u32);
Expand description

SIE status register

Tuple Fields§

§0: u32

Implementations§

source§

impl SieStatus

source

pub const fn vbus_detected(&self) -> bool

Device: VBUS Detected

source

pub fn set_vbus_detected(&mut self, val: bool)

Device: VBUS Detected

source

pub const fn line_state(&self) -> u8

USB bus line state

source

pub fn set_line_state(&mut self, val: u8)

USB bus line state

source

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.

source

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.

source

pub const fn speed(&self) -> u8

Host: device speed. Disconnected = 00, LS = 01, FS = 10

source

pub fn set_speed(&mut self, val: u8)

Host: device speed. Disconnected = 00, LS = 01, FS = 10

source

pub const fn vbus_over_curr(&self) -> bool

VBUS over current detected

source

pub fn set_vbus_over_curr(&mut self, val: bool)

VBUS over current detected

source

pub const fn resume(&self) -> bool

Host: Device has initiated a remote resume. Device: host has initiated a resume.

source

pub fn set_resume(&mut self, val: bool)

Host: Device has initiated a remote resume. Device: host has initiated a resume.

source

pub const fn connected(&self) -> bool

Device: connected

source

pub fn set_connected(&mut self, val: bool)

Device: connected

source

pub const fn setup_rec(&self) -> bool

Device: Setup packet received

source

pub fn set_setup_rec(&mut self, val: bool)

Device: Setup packet received

source

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

source

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

source

pub const fn bus_reset(&self) -> bool

Device: bus reset received

source

pub fn set_bus_reset(&mut self, val: bool)

Device: bus reset received

source

pub const fn crc_error(&self) -> bool

CRC Error. Raised by the Serial RX engine.

source

pub fn set_crc_error(&mut self, val: bool)

CRC Error. Raised by the Serial RX engine.

source

pub const fn bit_stuff_error(&self) -> bool

Bit Stuff Error. Raised by the Serial RX engine.

source

pub fn set_bit_stuff_error(&mut self, val: bool)

Bit Stuff Error. Raised by the Serial RX engine.

source

pub const fn rx_overflow(&self) -> bool

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

source

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.

source

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.

source

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.

source

pub const fn nak_rec(&self) -> bool

Host: NAK received

source

pub fn set_nak_rec(&mut self, val: bool)

Host: NAK received

source

pub const fn stall_rec(&self) -> bool

Host: STALL received

source

pub fn set_stall_rec(&mut self, val: bool)

Host: STALL received

source

pub const fn ack_rec(&self) -> bool

ACK received. Raised by both host and device.

source

pub fn set_ack_rec(&mut self, val: bool)

ACK received. Raised by both host and device.

source

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

source

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§

source§

impl Clone for SieStatus

source§

fn clone(&self) -> SieStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for SieStatus

source§

fn default() -> SieStatus

Returns the “default value” for a type. Read more
source§

impl PartialEq<SieStatus> for SieStatus

source§

fn eq(&self, other: &SieStatus) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SieStatus

source§

impl Eq for SieStatus

source§

impl StructuralEq for SieStatus

source§

impl StructuralPartialEq for SieStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.