pub struct Config {Show 16 fields
pub clock_hz: u32,
pub max_mem_freq: u32,
pub max_select_us: u32,
pub min_deselect_ns: u32,
pub cooldown: u8,
pub page_break: PageBreak,
pub init_clkdiv: u8,
pub enter_quad_cmd: Option<u8>,
pub quad_read_cmd: u8,
pub quad_write_cmd: Option<u8>,
pub dummy_cycles: u8,
pub read_format: FormatConfig,
pub write_format: Option<FormatConfig>,
pub mem_size: usize,
pub verification_type: VerificationType,
pub xip_writable: bool,
}Expand description
Memory configuration.
Fields§
§clock_hz: u32System clock frequency in Hz
max_mem_freq: u32Maximum memory operating frequency in Hz
max_select_us: u32Maximum CS assert time in microseconds (must be <= 8 us)
min_deselect_ns: u32Minimum CS deassert time in nanoseconds (must be >= 18 ns)
cooldown: u8Cooldown period between operations (in SCLK cycles)
page_break: PageBreakPage break size for memory operations
init_clkdiv: u8Clock divisor for direct mode operations during initialization
enter_quad_cmd: Option<u8>Enter Quad Mode command
quad_read_cmd: u8Quad Read command (fast read with 4-bit data)
quad_write_cmd: Option<u8>Quad Write command (page program with 4-bit data)
dummy_cycles: u8Number of dummy cycles for quad read operations
read_format: FormatConfigRead format configuration
write_format: Option<FormatConfig>Write format configuration
mem_size: usizeExpected memory size in bytes
verification_type: VerificationTypeDevice verification type
xip_writable: boolWhether the memory is writable via XIP (e.g., PSRAM vs. read-only flash)
Implementations§
Source§impl Config
impl Config
Sourcepub fn custom(
clock_hz: u32,
max_mem_freq: u32,
max_select_us: u32,
min_deselect_ns: u32,
cooldown: u8,
page_break: PageBreak,
init_clkdiv: u8,
enter_quad_cmd: Option<u8>,
quad_read_cmd: u8,
quad_write_cmd: Option<u8>,
dummy_cycles: u8,
read_format: FormatConfig,
write_format: Option<FormatConfig>,
mem_size: usize,
verification_type: VerificationType,
xip_writable: bool,
) -> Self
pub fn custom( clock_hz: u32, max_mem_freq: u32, max_select_us: u32, min_deselect_ns: u32, cooldown: u8, page_break: PageBreak, init_clkdiv: u8, enter_quad_cmd: Option<u8>, quad_read_cmd: u8, quad_write_cmd: Option<u8>, dummy_cycles: u8, read_format: FormatConfig, write_format: Option<FormatConfig>, mem_size: usize, verification_type: VerificationType, xip_writable: bool, ) -> Self
Create a custom memory configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.