#[repr(transparent)]pub struct Pstat(pub u32);Expand description
Port Status. RDSTAT/WRSTAT depend on port type; change them through PIRULESTAT, not ordinary writes. Interrupt cause bits 8-14 are sticky write-one-to-clear, even with interrupts masked. Clearing INTERR also clears ERR0-ERR3. RPMC_FLASH_DEVICE may toggle for non-RPMC commands and must then be ignored.
Tuple Fields§
§0: u32Implementations§
Source§impl Pstat
impl Pstat
Sourcepub const fn rdstat(&self) -> u8
pub const fn rdstat(&self) -> u8
Host Read Data Status. Encodings: 0: Endpoint or index-and-data: Empty. Mailbox: Empty (host read to end). Master/Flash: No requests.; 1: Endpoint or index-and-data: Data waiting from MCU. Mailbox: Started (by MCU). Master/Flash: Started. From-host: goes to Pending next. To-host: goes to Complete next. SAF: host made request: Started.; 2: Mailbox: Complete (by MCU). Master/Flash: Complete. SAF: Complete.; 3: Mailbox: Partially read (by host). Master/Flash: From-host only, Pending (request made); goes to Complete next. SAF: MCU has setup completion.
Sourcepub const fn set_rdstat(&mut self, val: u8)
pub const fn set_rdstat(&mut self, val: u8)
Host Read Data Status. Encodings: 0: Endpoint or index-and-data: Empty. Mailbox: Empty (host read to end). Master/Flash: No requests.; 1: Endpoint or index-and-data: Data waiting from MCU. Mailbox: Started (by MCU). Master/Flash: Started. From-host: goes to Pending next. To-host: goes to Complete next. SAF: host made request: Started.; 2: Mailbox: Complete (by MCU). Master/Flash: Complete. SAF: Complete.; 3: Mailbox: Partially read (by host). Master/Flash: From-host only, Pending (request made); goes to Complete next. SAF: MCU has setup completion.
Sourcepub const fn wrstat(&self) -> u8
pub const fn wrstat(&self) -> u8
Status of Host Writes. Encodings: 0: Endpoint: Empty. Index-and-data: Empty. Mailbox: Empty. Master/flash: Not last request.; 1: Endpoint: data waiting from host. Index-and-data: data waiting from host (index may have been written before). Mailbox: Started (by host). Master/flash: last request from-host/read-flash (writes to MCU). SAF: Request from master was or is Flash Read.; 2: Endpoint: Empty, but last was CMD. Index-and-data: wrote index. Mailbox: complete/last (host to end). Master/flash: last request to-host/write-flash (read from MCU). SAF: Request from Master was or is Flash Write.; 3: Endpoint: CMD waiting from host. Index-and-data: Wrote Data then Index. Mailbox: Partially read (by MCU). Flash: Last Requested Erase. SAF: Request from Master was or is Flash Erase.
Sourcepub const fn set_wrstat(&mut self, val: u8)
pub const fn set_wrstat(&mut self, val: u8)
Status of Host Writes. Encodings: 0: Endpoint: Empty. Index-and-data: Empty. Mailbox: Empty. Master/flash: Not last request.; 1: Endpoint: data waiting from host. Index-and-data: data waiting from host (index may have been written before). Mailbox: Started (by host). Master/flash: last request from-host/read-flash (writes to MCU). SAF: Request from master was or is Flash Read.; 2: Endpoint: Empty, but last was CMD. Index-and-data: wrote index. Mailbox: complete/last (host to end). Master/flash: last request to-host/write-flash (read from MCU). SAF: Request from Master was or is Flash Write.; 3: Endpoint: CMD waiting from host. Index-and-data: Wrote Data then Index. Mailbox: Partially read (by MCU). Flash: Last Requested Erase. SAF: Request from Master was or is Flash Erase.
Sourcepub const fn set_interr(&mut self, val: bool)
pub const fn set_interr(&mut self, val: bool)
Interrupt Caused by Error
Sourcepub const fn set_intspc0(&mut self, val: bool)
pub const fn set_intspc0(&mut self, val: bool)
SPC0 Interrupt
Sourcepub const fn set_intspc1(&mut self, val: bool)
pub const fn set_intspc1(&mut self, val: bool)
SPC1 Interrupt
Sourcepub const fn set_intspc2(&mut self, val: bool)
pub const fn set_intspc2(&mut self, val: bool)
SPC2 Interrupt
Sourcepub const fn set_instspc3(&mut self, val: bool)
pub const fn set_instspc3(&mut self, val: bool)
SPC3 Interrupt
Sourcepub const fn rpmc_1_or_2(&self) -> bool
pub const fn rpmc_1_or_2(&self) -> bool
RPMC 1 or 2. Encodings: 0: RPMC operation 1 has been chosen; 1: RPMC operation 2 has been chosen
Sourcepub const fn set_rpmc_1_or_2(&mut self, val: bool)
pub const fn set_rpmc_1_or_2(&mut self, val: bool)
RPMC 1 or 2. Encodings: 0: RPMC operation 1 has been chosen; 1: RPMC operation 2 has been chosen
Sourcepub const fn rpmc_flash_device(&self) -> u8
pub const fn rpmc_flash_device(&self) -> u8
RPMC Flash Device. Encodings: 0: First device; 1: Second device; 2: Third device; 3: Fourth device
Sourcepub const fn set_rpmc_flash_device(&mut self, val: u8)
pub const fn set_rpmc_flash_device(&mut self, val: u8)
RPMC Flash Device. Encodings: 0: First device; 1: Second device; 2: Third device; 3: Fourth device