Struct stm32_metapac::sdmmc::regs::Cmdr
#[repr(transparent)]pub struct Cmdr(pub u32);
Expand description
The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM).
Tuple Fields§
§0: u32
Implementations§
§impl Cmdr
impl Cmdr
pub const fn cmdindex(&self) -> u8
pub const fn cmdindex(&self) -> u8
Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message.
pub fn set_cmdindex(&mut self, val: u8)
pub fn set_cmdindex(&mut self, val: u8)
Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message.
pub const fn cmdtrans(&self) -> bool
pub const fn cmdtrans(&self) -> bool
The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent.
pub fn set_cmdtrans(&mut self, val: bool)
pub fn set_cmdtrans(&mut self, val: bool)
The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent.
pub const fn cmdstop(&self) -> bool
pub const fn cmdstop(&self) -> bool
The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent.
pub fn set_cmdstop(&mut self, val: bool)
pub fn set_cmdstop(&mut self, val: bool)
The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent.
pub const fn waitresp(&self) -> u8
pub const fn waitresp(&self) -> u8
Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response.
pub fn set_waitresp(&mut self, val: u8)
pub fn set_waitresp(&mut self, val: u8)
Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response.
pub const fn waitint(&self) -> bool
pub const fn waitint(&self) -> bool
CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode.
pub fn set_waitint(&mut self, val: bool)
pub fn set_waitint(&mut self, val: bool)
CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode.
pub const fn waitpend(&self) -> bool
pub const fn waitpend(&self) -> bool
CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card.
pub fn set_waitpend(&mut self, val: bool)
pub fn set_waitpend(&mut self, val: bool)
CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card.
pub const fn cpsmen(&self) -> bool
pub const fn cpsmen(&self) -> bool
Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0.
pub fn set_cpsmen(&mut self, val: bool)
pub fn set_cpsmen(&mut self, val: bool)
Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0.
pub const fn dthold(&self) -> bool
pub const fn dthold(&self) -> bool
Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state.
pub fn set_dthold(&mut self, val: bool)
pub fn set_dthold(&mut self, val: bool)
Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state.
pub const fn bootmode(&self) -> bool
pub const fn bootmode(&self) -> bool
Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)
pub fn set_bootmode(&mut self, val: bool)
pub fn set_bootmode(&mut self, val: bool)
Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)
pub fn set_booten(&mut self, val: bool)
pub fn set_booten(&mut self, val: bool)
Enable boot mode procedure.
pub const fn cmdsuspend(&self) -> bool
pub const fn cmdsuspend(&self) -> bool
The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1.
pub fn set_cmdsuspend(&mut self, val: bool)
pub fn set_cmdsuspend(&mut self, val: bool)
The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1.
Trait Implementations§
impl Copy for Cmdr
impl Eq for Cmdr
impl StructuralPartialEq for Cmdr
Auto Trait Implementations§
impl Freeze for Cmdr
impl RefUnwindSafe for Cmdr
impl Send for Cmdr
impl Sync for Cmdr
impl Unpin for Cmdr
impl UnwindSafe for Cmdr
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
)