pub struct Nand<FMC, IC> { /* private fields */ }
Expand description
FMC Peripheral specialized as a NAND Controller. Not yet initialized.
Implementations§
source§impl<IC: NandChip, FMC: FmcPeripheral> Nand<FMC, IC>
impl<IC: NandChip, FMC: FmcPeripheral> Nand<FMC, IC>
sourcepub fn new<PINS>(fmc: FMC, _pins: PINS, _chip: IC) -> Selfwhere
PINS: PinsNand,
pub fn new<PINS>(fmc: FMC, _pins: PINS, _chip: IC) -> Selfwhere
PINS: PinsNand,
New NAND instance
_pins
must be a set of pins connecting to an NAND on the FMC
controller
§Panics
- Panics if there is a mismatch between the data lines in
PINS
and the NAND device
sourcepub unsafe fn new_unchecked(fmc: FMC, _chip: IC) -> Self
pub unsafe fn new_unchecked(fmc: FMC, _chip: IC) -> Self
New NAND instance
§Safety
This method does not ensure that IO pins are configured correctly. Misconfiguration may result in a bus lockup or stall when attempting to initialise the NAND device.
The pins are not checked against the requirements for the NAND chip. Using this method it is possible to initialise a NAND device without sufficient pins to access the whole memory
sourcepub fn init<D>(&mut self, delay: &mut D) -> NandDevice
pub fn init<D>(&mut self, delay: &mut D) -> NandDevice
Initialise NAND instance. delay
is used to wait 1µs after enabling the
memory controller.
Returns a NandDevice
instance.
§Panics
- Panics if any setting in
IC::CONFIG
cannot be achieved - Panics if the FMC Kernel Clock is too fast to achieve the timing required by the NAND device
Auto Trait Implementations§
impl<FMC, IC> Freeze for Nand<FMC, IC>where
FMC: Freeze,
impl<FMC, IC> RefUnwindSafe for Nand<FMC, IC>where
FMC: RefUnwindSafe,
IC: RefUnwindSafe,
impl<FMC, IC> Send for Nand<FMC, IC>
impl<FMC, IC> Sync for Nand<FMC, IC>
impl<FMC, IC> Unpin for Nand<FMC, IC>
impl<FMC, IC> UnwindSafe for Nand<FMC, IC>where
FMC: UnwindSafe,
IC: UnwindSafe,
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