#[repr(C, packed(1))]pub struct ConfigurationBlock { /* private fields */ }
Expand description
A serial NOR configuration block
This is the memory that you’ll need to properly place in memory in order to boot your i.MX RT system. Consider keeping the symbol name, and specifying a link section, so that you can more easily place the memory in your linker script.
Unless otherwise specified, all unset fields are set to a bitpattern of zero.
§1170 notes
By default, isUniformBlockSize
is set to 1, indicating that the block size and
sector sizes are equal. Using block_size
clears this field and allows you to
differentiate the block size from the sector size.
use imxrt_boot_gen::serial_flash::nor;
#[no_mangle]
#[link_section = ".serial_nor_cb"]
static SERIAL_NOR_CONFIGURATION_BLOCK: nor::ConfigurationBlock =
nor::ConfigurationBlock::new(FLEXSPI_CONFIGURATION_BLOCK)
.page_size(256)
.sector_size(4096)
.ip_cmd_serial_clk_freq(nor::SerialClockFrequency::MHz30);
Implementations§
Source§impl ConfigurationBlock
impl ConfigurationBlock
Sourcepub const fn new(mem_cfg: ConfigurationBlock) -> Self
pub const fn new(mem_cfg: ConfigurationBlock) -> Self
Create a new serial NOR configuration block based on the FlexSPI configuration block
Sourcepub const fn sector_size(self, sector_size: u32) -> Self
pub const fn sector_size(self, sector_size: u32) -> Self
Set the serial NOR sector size
Sourcepub const fn ip_cmd_serial_clk_freq(
self,
serial_clock_frequency: SerialClockFrequency,
) -> Self
pub const fn ip_cmd_serial_clk_freq( self, serial_clock_frequency: SerialClockFrequency, ) -> Self
Set the serial clock frequency
Trait Implementations§
Source§impl Clone for ConfigurationBlock
impl Clone for ConfigurationBlock
Source§fn clone(&self) -> ConfigurationBlock
fn clone(&self) -> ConfigurationBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConfigurationBlock
impl Debug for ConfigurationBlock
impl Copy for ConfigurationBlock
Auto Trait Implementations§
impl Freeze for ConfigurationBlock
impl RefUnwindSafe for ConfigurationBlock
impl Send for ConfigurationBlock
impl Sync for ConfigurationBlock
impl Unpin for ConfigurationBlock
impl UnwindSafe for ConfigurationBlock
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