Struct rp_pac::otp_data::regs::FlashDevinfo
source · #[repr(transparent)]pub struct FlashDevinfo(pub u16);
Expand description
Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set.
Tuple Fields§
§0: u16
Implementations§
source§impl FlashDevinfo
impl FlashDevinfo
sourcepub const fn cs1_gpio(&self) -> u8
pub const fn cs1_gpio(&self) -> u8
Indicate a GPIO number to be used for the secondary flash chip select (CS1), which selects the external QSPI device mapped at system addresses 0x11000000 through 0x11ffffff. There is no such configuration for CS0, as the primary chip select has a dedicated pin. On RP2350 the permissible GPIO numbers are 0, 8, 19 and 47. Ignored if CS1_size is zero. If CS1_SIZE is nonzero, the bootrom will automatically configure this GPIO as a second chip select upon entering the flash boot path, or entering any other path that may use the QSPI flash interface, such as BOOTSEL mode (nsboot).
sourcepub fn set_cs1_gpio(&mut self, val: u8)
pub fn set_cs1_gpio(&mut self, val: u8)
Indicate a GPIO number to be used for the secondary flash chip select (CS1), which selects the external QSPI device mapped at system addresses 0x11000000 through 0x11ffffff. There is no such configuration for CS0, as the primary chip select has a dedicated pin. On RP2350 the permissible GPIO numbers are 0, 8, 19 and 47. Ignored if CS1_size is zero. If CS1_SIZE is nonzero, the bootrom will automatically configure this GPIO as a second chip select upon entering the flash boot path, or entering any other path that may use the QSPI flash interface, such as BOOTSEL mode (nsboot).
sourcepub const fn d8h_erase_supported(&self) -> bool
pub const fn d8h_erase_supported(&self) -> bool
If true, all attached devices are assumed to support (or ignore, in the case of PSRAM) a block erase command with a command prefix of D8h, an erase size of 64 kiB, and a 24-bit address. Almost all 25-series flash devices support this command. If set, the bootrom will use the D8h erase command where it is able, to accelerate bulk erase operations. This makes flash programming faster. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, this field defaults to false.
sourcepub fn set_d8h_erase_supported(&mut self, val: bool)
pub fn set_d8h_erase_supported(&mut self, val: bool)
If true, all attached devices are assumed to support (or ignore, in the case of PSRAM) a block erase command with a command prefix of D8h, an erase size of 64 kiB, and a 24-bit address. Almost all 25-series flash devices support this command. If set, the bootrom will use the D8h erase command where it is able, to accelerate bulk erase operations. This makes flash programming faster. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, this field defaults to false.
sourcepub const fn cs0_size(&self) -> Cs0size
pub const fn cs0_size(&self) -> Cs0size
The size of the flash/PSRAM device on chip select 0 (addressable at 0x10000000 through 0x10ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values are decoded as 4kiB << CS0_SIZE. For example, four megabytes is encoded with a CS0_SIZE value of 10, and 16 megabytes is encoded with a CS0_SIZE value of 12. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of 12 (16 MiB) is used.
sourcepub fn set_cs0_size(&mut self, val: Cs0size)
pub fn set_cs0_size(&mut self, val: Cs0size)
The size of the flash/PSRAM device on chip select 0 (addressable at 0x10000000 through 0x10ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values are decoded as 4kiB << CS0_SIZE. For example, four megabytes is encoded with a CS0_SIZE value of 10, and 16 megabytes is encoded with a CS0_SIZE value of 12. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of 12 (16 MiB) is used.
sourcepub const fn cs1_size(&self) -> Cs1size
pub const fn cs1_size(&self) -> Cs1size
The size of the flash/PSRAM device on chip select 1 (addressable at 0x11000000 through 0x11ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values are decoded as 4kiB << CS1_SIZE. For example, four megabytes is encoded with a CS1_SIZE value of 10, and 16 megabytes is encoded with a CS1_SIZE value of 12. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of zero is used.
sourcepub fn set_cs1_size(&mut self, val: Cs1size)
pub fn set_cs1_size(&mut self, val: Cs1size)
The size of the flash/PSRAM device on chip select 1 (addressable at 0x11000000 through 0x11ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values are decoded as 4kiB << CS1_SIZE. For example, four megabytes is encoded with a CS1_SIZE value of 10, and 16 megabytes is encoded with a CS1_SIZE value of 12. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of zero is used.
Trait Implementations§
source§impl Clone for FlashDevinfo
impl Clone for FlashDevinfo
source§fn clone(&self) -> FlashDevinfo
fn clone(&self) -> FlashDevinfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for FlashDevinfo
impl Default for FlashDevinfo
source§fn default() -> FlashDevinfo
fn default() -> FlashDevinfo
source§impl PartialEq for FlashDevinfo
impl PartialEq for FlashDevinfo
impl Copy for FlashDevinfo
impl Eq for FlashDevinfo
impl StructuralPartialEq for FlashDevinfo
Auto Trait Implementations§
impl Freeze for FlashDevinfo
impl RefUnwindSafe for FlashDevinfo
impl Send for FlashDevinfo
impl Sync for FlashDevinfo
impl Unpin for FlashDevinfo
impl UnwindSafe for FlashDevinfo
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
)