mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
Expose rx_delay in nrf qspi config
This commit is contained in:
parent
51de518bd3
commit
eb70d744a9
@ -80,6 +80,8 @@ pub struct Config {
|
||||
pub frequency: Frequency,
|
||||
/// Value is specified in number of 16 MHz periods (62.5 ns)
|
||||
pub sck_delay: u8,
|
||||
/// Value is specified in number of 64 MHz periods (15.625 ns), valid values between 0 and 7 (inclusive)
|
||||
pub rx_delay: u8,
|
||||
/// Whether data is captured on the clock rising edge and data is output on a falling edge (MODE0) or vice-versa (MODE3)
|
||||
pub spi_mode: SpiMode,
|
||||
/// Addressing mode (24-bit or 32-bit)
|
||||
@ -98,6 +100,7 @@ impl Default for Config {
|
||||
deep_power_down: None,
|
||||
frequency: Frequency::M8,
|
||||
sck_delay: 80,
|
||||
rx_delay: 2,
|
||||
spi_mode: SpiMode::MODE0,
|
||||
address_mode: AddressMode::_24BIT,
|
||||
capacity: 0,
|
||||
@ -202,6 +205,11 @@ impl<'d, T: Instance> Qspi<'d, T> {
|
||||
w
|
||||
});
|
||||
|
||||
r.iftiming.write(|w| unsafe {
|
||||
w.rxdelay().bits(config.rx_delay & 0b111);
|
||||
w
|
||||
});
|
||||
|
||||
r.xipoffset.write(|w| unsafe {
|
||||
w.xipoffset().bits(config.xip_offset);
|
||||
w
|
||||
|
Loading…
Reference in New Issue
Block a user