rp-pac

Crates

git

Versions

rp235x

Flavors

Struct rp_pac::qmi::regs::Wfmt

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

Write transfer format configuration for memory address window 1. Configure the bus width of each transfer phase individually, and configure the length or presence of the command prefix, command suffix and dummy/turnaround transfer phases. Only 24-bit addresses are supported. The reset value of the M1_WFMT register is configured to support a basic 02h serial write transfer. However, writes to this window must first be enabled via the XIP_CTRL_WRITABLE_M1 bit, as XIP memory is read-only by default.

Tuple Fields§

§0: u32

Implementations§

source§

impl Wfmt

source

pub const fn prefix_width(&self) -> PrefixWidth

The transfer width used for the command prefix, if any

source

pub fn set_prefix_width(&mut self, val: PrefixWidth)

The transfer width used for the command prefix, if any

source

pub const fn addr_width(&self) -> AddrWidth

The transfer width used for the address. The address phase always transfers 24 bits in total.

source

pub fn set_addr_width(&mut self, val: AddrWidth)

The transfer width used for the address. The address phase always transfers 24 bits in total.

source

pub const fn suffix_width(&self) -> SuffixWidth

The width used for the post-address command suffix, if any

source

pub fn set_suffix_width(&mut self, val: SuffixWidth)

The width used for the post-address command suffix, if any

source

pub const fn dummy_width(&self) -> DummyWidth

The width used for the dummy phase, if any. If width is single, SD0/MOSI is held asserted low during the dummy phase, and SD1…SD3 are tristated. If width is dual/quad, all IOs are tristated during the dummy phase.

source

pub fn set_dummy_width(&mut self, val: DummyWidth)

The width used for the dummy phase, if any. If width is single, SD0/MOSI is held asserted low during the dummy phase, and SD1…SD3 are tristated. If width is dual/quad, all IOs are tristated during the dummy phase.

source

pub const fn data_width(&self) -> DataWidth

The width used for the data transfer

source

pub fn set_data_width(&mut self, val: DataWidth)

The width used for the data transfer

source

pub const fn prefix_len(&self) -> PrefixLen

Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)

source

pub fn set_prefix_len(&mut self, val: PrefixLen)

Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)

source

pub const fn suffix_len(&self) -> SuffixLen

Length of post-address command suffix, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single) Only values of 0 and 8 bits are supported.

source

pub fn set_suffix_len(&mut self, val: SuffixLen)

Length of post-address command suffix, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single) Only values of 0 and 8 bits are supported.

source

pub const fn dummy_len(&self) -> DummyLen

Length of dummy phase between command suffix and data phase, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single)

source

pub fn set_dummy_len(&mut self, val: DummyLen)

Length of dummy phase between command suffix and data phase, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single)

source

pub const fn dtr(&self) -> bool

Enable double transfer rate (DTR) for write commands: address, suffix and write data phases are active on both edges of SCK. SDO data is launched centre-aligned on each SCK edge, and SDI data is captured on the SCK edge that follows its launch. DTR is implemented by halving the clock rate; SCK has a period of 2 x CLK_DIV throughout the transfer. The prefix and dummy phases are still single transfer rate. If the suffix is quad-width, it must be 0 or 8 bits in length, to ensure an even number of SCK edges.

source

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

Enable double transfer rate (DTR) for write commands: address, suffix and write data phases are active on both edges of SCK. SDO data is launched centre-aligned on each SCK edge, and SDI data is captured on the SCK edge that follows its launch. DTR is implemented by halving the clock rate; SCK has a period of 2 x CLK_DIV throughout the transfer. The prefix and dummy phases are still single transfer rate. If the suffix is quad-width, it must be 0 or 8 bits in length, to ensure an even number of SCK edges.

Trait Implementations§

source§

impl Clone for Wfmt

source§

fn clone(&self) -> Wfmt

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 Wfmt

source§

fn default() -> Wfmt

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

impl PartialEq for Wfmt

source§

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

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

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

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

impl Copy for Wfmt

source§

impl Eq for Wfmt

source§

impl StructuralPartialEq for Wfmt

Auto Trait Implementations§

§

impl Freeze for Wfmt

§

impl RefUnwindSafe for Wfmt

§

impl Send for Wfmt

§

impl Sync for Wfmt

§

impl Unpin for Wfmt

§

impl UnwindSafe for Wfmt

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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 T
where U: Into<T>,

source§

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 T
where U: TryFrom<T>,

source§

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.