Skip to content

Commit 64e7bc5

Browse files
committed
Initial Octo SPI support
Much of the functionality shared with QuadSPI
1 parent acd47be commit 64e7bc5

File tree

11 files changed

+1225
-805
lines changed

11 files changed

+1225
-805
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- stm32h7b3
2323
- stm32h7b0
2424
env: # Peripheral Feature flags
25-
FLAGS: rt,quadspi,sdmmc,fmc,usb_hs,rtc,ethernet,ltdc,crc
25+
FLAGS: rt,xspi,sdmmc,fmc,usb_hs,rtc,ethernet,ltdc,crc
2626

2727
steps:
2828
- uses: actions/checkout@v2

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- log-semihost
2020
- log-rtt
2121
env: # Peripheral Feature flags
22-
FLAGS: rt,quadspi,sdmmc,fmc,usb_hs,rtc,ethernet,ltdc,crc
22+
FLAGS: rt,xspi,sdmmc,fmc,usb_hs,rtc,ethernet,ltdc,crc
2323

2424
steps:
2525
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
* **Breaking**: Rename the `quadspi` flag to `xspi`
6+
57
## [v0.9.0] 2021-03-12
68

79
* Updates `cortex-m` to v0.7.1. `cortex-m` v0.6.5+ [are forward compatible with

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ cm4 = []
8484
cm7 = []
8585
smps = []
8686
ltdc = ["embedded-display-controller"]
87-
quadspi = []
87+
xspi = []
8888
fmc = ["stm32-fmc"]
8989
sdmmc = ["sdio-host"]
9090
ethernet = ["smoltcp"]
@@ -141,7 +141,7 @@ required-features = ["fmc"]
141141

142142
[[example]]
143143
name = "qspi"
144-
required-features = ["quadspi", "rm0433"]
144+
required-features = ["xspi", "rm0433"]
145145

146146
[[example]]
147147
name = "sdmmc"

examples/qspi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
mod utilities;
77

88
use cortex_m_rt::entry;
9-
use stm32h7xx_hal::{pac, prelude::*, qspi::QspiMode};
9+
use stm32h7xx_hal::{pac, prelude::*, xspi::QspiMode};
1010

1111
use log::info;
1212

src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! * [Serial Peripheral Interface (SPI)](crate::spi)
2424
//! * [Serial Data (USART/UART)](crate::serial)
2525
//! * [Serial Audio Interface](crate::sai)
26-
//! * [Quad SPI](crate::qspi) Feature gate `qspi`
26+
//! * [Quad or Octo SPI](crate::xspi) Feature gate `xspi`
2727
//! * [Ethernet](crate::ethernet) Feature gate `ethernet`
2828
//! * [USB HS](crate::usb_hs) Feature gate `usb_hs`
2929
//!
@@ -166,12 +166,6 @@ pub mod pwm;
166166
pub mod pwr;
167167
#[cfg(feature = "device-selected")]
168168
pub mod qei;
169-
#[cfg(all(
170-
feature = "device-selected",
171-
feature = "quadspi",
172-
not(feature = "rm0455")
173-
))]
174-
pub mod qspi;
175169
#[cfg(feature = "device-selected")]
176170
pub mod rcc;
177171
#[cfg(feature = "device-selected")]
@@ -196,3 +190,5 @@ pub mod timer;
196190
pub mod usb_hs;
197191
#[cfg(feature = "device-selected")]
198192
pub mod watchdog;
193+
#[cfg(all(feature = "device-selected", feature = "xspi"))]
194+
pub mod xspi;

src/prelude.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ pub use crate::i2c::I2cExt as _stm32h7xx_hal_i2c_I2cExt;
1515
pub use crate::pwm::PwmAdvExt as _stm32_hal_pwm_PwmAdvExt;
1616
pub use crate::pwm::PwmExt as _stm32_hal_pwm_PwmExt;
1717
pub use crate::pwr::PwrExt as _stm32h7xx_hal_pwr_PwrExt;
18-
#[cfg(all(feature = "quadspi", not(feature = "rm0455")))]
19-
pub use crate::qspi::QspiExt as _stm32h7xx_hal_qspi_QspiExt;
2018
pub use crate::rcc::RccExt as _stm32h7xx_hal_rcc_RccExt;
2119
pub use crate::rng::RngCore as _stm32h7xx_hal_rng_RngCore;
2220
pub use crate::rng::RngExt as _stm32h7xx_hal_rng_RngExt;
@@ -27,3 +25,5 @@ pub use crate::serial::SerialExt as _stm32h7xx_hal_serial_SerialExt;
2725
pub use crate::spi::SpiExt as _stm32h7xx_hal_spi_SpiExt;
2826
pub use crate::time::U32Ext as _stm32h7xx_hal_time_U32Ext;
2927
pub use crate::timer::TimerExt as _stm32h7xx_hal_timer_TimerExt;
28+
#[cfg(all(feature = "xspi"))]
29+
pub use crate::xspi::XspiExt as _stm32h7xx_hal_xspi_XspiExt;

0 commit comments

Comments
 (0)