#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.frequency: FrequencyBus frequency.
spi_mode: ModeSPI clock polarity and phase.
lines: LinesMulti-line mode used for the read/write data phases.
address_mode: AddressModeFlash addressing mode (24-bit or 32-bit).
read_opcode: u8Read command opcode (e.g. 0xEB Quad I/O Read, 0x03 Read).
write_opcode: u8Page-program command opcode (e.g. 0x38 Quad I/O PP, 0x02 Page Program).
read_dummy_cycles: u8Dummy/wait cycles after the address phase of a read. Opcode- and
flash-specific: MX25R 0xEB → 6, 0x6B/0x0B → 8, 0x03 → 0.
write_page_size: u32Flash page size for program operations. Programs are split so they never cross a page boundary (the flash wraps within a page otherwise).
sample_delay: u8RX 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: u32Flash capacity in bytes, used for bounds checks. 0 disables them.