pub struct Sdram<FMC, IC> { /* private fields */ }Expand description
SDRAM Controller
Implementations§
source§impl<IC: SdramChip, FMC: FmcPeripheral> Sdram<FMC, IC>
impl<IC: SdramChip, FMC: FmcPeripheral> Sdram<FMC, IC>
sourcepub fn new<PINS, BANK, ADDR>(fmc: FMC, _pins: PINS, _chip: IC) -> Selfwhere
PINS: PinsSdram<BANK, ADDR>,
ADDR: AddressPinSet,
BANK: SdramPinSet,
pub fn new<PINS, BANK, ADDR>(fmc: FMC, _pins: PINS, _chip: IC) -> Selfwhere
PINS: PinsSdram<BANK, ADDR>,
ADDR: AddressPinSet,
BANK: SdramPinSet,
New SDRAM instance
_pins must be a set of pins connecting to an SDRAM on the FMC
controller
Panics
-
Panics if there are not enough address lines in
PINSto access the whole SDRAM -
Panics if there are not enough bank address lines in
PINSto access the whole SDRAM
sourcepub fn new_unchecked(
fmc: FMC,
bank: impl Into<SdramTargetBank>,
_chip: IC
) -> Self
pub fn new_unchecked(
fmc: FMC,
bank: impl Into<SdramTargetBank>,
_chip: IC
) -> Self
New SDRAM instance
bank denotes which SDRAM bank to target. This can be either bank 1 or
bank 2.
Safety
The pins are not checked against the requirements for the SDRAM chip. So you may be able to initialise a SDRAM without enough pins to access the whole memory
sourcepub fn init<D>(&mut self, delay: &mut D) -> *mut u32where
D: DelayUs<u8>,
pub fn init<D>(&mut self, delay: &mut D) -> *mut u32where
D: DelayUs<u8>,
Initialise SDRAM instance. Delay is used to wait the SDRAM powerup delay
Returns a raw pointer to the memory-mapped SDRAM block
Panics
-
Panics if any setting in
IC::CONFIGcannot be achieved -
Panics if the FMC source clock is too fast for maximum SD clock in
IC::TIMING