pub struct LookupTable(/* private fields */);
Expand description
A sequence lookup table, part of the general FlexSPI configuration block
The contents of the sequences depend on what kind of FLASH device we’re interfacing. Refer to your FLASH device manual for more information.
Any unspecified command is set to a sequence of STOPs.
use imxrt_boot_gen::flexspi::{
LookupTable,
Command,
SequenceBuilder,
Sequence, Instr,
opcodes::sdr::*,
Pads,
};
const LUT: LookupTable = LookupTable::new()
.command(Command::Read, SequenceBuilder::new()
.instr(Instr::new(CMD, Pads::One, 0xEB))
.instr(Instr::new(RADDR, Pads::Four, 0x02))
.build());
Implementations§
Source§impl LookupTable
impl LookupTable
Sourcepub const fn command(self, cmd: Command, sequence: Sequence) -> Self
pub const fn command(self, cmd: Command, sequence: Sequence) -> Self
Assign the sequence
to the command that is found at the Command
index
Sourcepub const fn custom_command(self, index: usize, sequence: Sequence) -> Self
pub const fn custom_command(self, index: usize, sequence: Sequence) -> Self
Assign a sequence to one of the freely-available LUT indexes.
You’re responsible for making sure this doesn’t accidentally
overwrite one of the standard Command
sequences.
Trait Implementations§
Source§impl Clone for LookupTable
impl Clone for LookupTable
Source§fn clone(&self) -> LookupTable
fn clone(&self) -> LookupTable
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 LookupTable
impl Debug for LookupTable
Source§impl Default for LookupTable
impl Default for LookupTable
impl Copy for LookupTable
Auto Trait Implementations§
impl Freeze for LookupTable
impl RefUnwindSafe for LookupTable
impl Send for LookupTable
impl Sync for LookupTable
impl Unpin for LookupTable
impl UnwindSafe for LookupTable
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