embassy-nrf

Crates

git

Versions

nrf54lm20-app-s

Flavors

Skip to main content

Config

Struct Config 

Source
#[non_exhaustive]
pub struct Config { pub frequency: Frequency, pub spi_mode: Mode, pub lines: Lines, pub address_mode: AddressMode, pub read_opcode: u8, pub write_opcode: u8, pub read_dummy_cycles: u8, pub write_page_size: u32, pub sample_delay: u8, pub capacity: u32, }
Expand description

sQSPI driver configuration.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§frequency: Frequency

Bus frequency.

§spi_mode: Mode

SPI clock polarity and phase.

§lines: Lines

Multi-line mode used for the read/write data phases.

§address_mode: AddressMode

Flash addressing mode (24-bit or 32-bit).

§read_opcode: u8

Read command opcode (e.g. 0xEB Quad I/O Read, 0x03 Read).

§write_opcode: u8

Page-program command opcode (e.g. 0x38 Quad I/O PP, 0x02 Page Program).

§read_dummy_cycles: u8

Dummy/wait cycles after the address phase of a read. Opcode- and flash-specific: MX25R 0xEB → 6, 0x6B/0x0B → 8, 0x03 → 0.

§write_page_size: u32

Flash page size for program operations. Programs are split so they never cross a page boundary (the flash wraps within a page otherwise).

§sample_delay: u8

RX sample delay, in SCK cycles.

Must be at least 1 for normal-speed transfers: with 0 the sampled RX data is unreliable (RDSR returns garbage, breaking WIP polling). The default is 1, matching Nordic’s Zephyr driver.

§capacity: u32

Flash capacity in bytes, used for bounds checks. 0 disables them.

Trait Implementations§

Source§

impl Default for Config

Source§

fn default() -> Self

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

Auto Trait Implementations§

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> 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 = !

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.