Skip to content

Commit 18f8538

Browse files
committed
Update MDMA support for quadspi
1 parent 44ad3cd commit 18f8538

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ required-features = ["fmc", "rm0399"]
147147
name = "qspi"
148148
required-features = ["xspi", "rm0433"]
149149

150+
[[example]]
151+
name = "qspi_mdma"
152+
required-features = ["xspi", "rm0433"]
153+
150154
[[example]]
151155
name = "octospi"
152156
required-features = ["xspi", "rm0468"]

examples/qspi_mdma.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod utilities;
1313
use core::mem;
1414

1515
use cortex_m_rt::entry;
16-
use stm32h7xx_hal::{pac, prelude::*, qspi, qspi::QspiMode};
16+
use stm32h7xx_hal::{pac, prelude::*, xspi, xspi::QspiMode};
1717

1818
use stm32h7xx_hal::dma::{
1919
mdma::{
@@ -57,7 +57,7 @@ fn main() -> ! {
5757
info!("stm32h7xx-hal example - QSPI with MDMA");
5858
info!("");
5959

60-
let config: qspi::Config = 1.mhz().into();
60+
let config: xspi::Config = 1.mhz().into();
6161
// Threshold when half full
6262
let config = config.fifo_threshold(16);
6363

src/dma/mdma.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,8 @@ peripheral_target_address!(
12501250
(pac::QUADSPI, dr, u32, P2M),
12511251
(pac::QUADSPI, dr, u32, M2P),
12521252
);
1253-
#[cfg(all(feature = "quadspi", any(feature = "rm0433", feature = "rm0399")))]
1253+
#[cfg(all(feature = "xspi", any(feature = "rm0433", feature = "rm0399")))]
12541254
peripheral_target_address!(
1255-
(INNER: crate::qspi::Qspi, dr, u32, P2M),
1256-
(INNER: crate::qspi::Qspi, dr, u32, M2P),
1255+
(INNER: crate::xspi::Qspi<pac::QUADSPI>, dr, u32, P2M),
1256+
(INNER: crate::xspi::Qspi<pac::QUADSPI>, dr, u32, M2P),
12571257
);

0 commit comments

Comments
 (0)