Skip to content

Commit 213dc5d

Browse files
committed
i2s feature
1 parent a7ecd01 commit 213dc5d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ defmt = ["dep:defmt", "fugit/defmt", "nb/defmt-0-3"]
134134
can = ["dep:bxcan"]
135135

136136
## I2S peripheral support. See [stm32_i2s_v12x](https://crates.io/crates/stm32_i2s_v12x)
137-
i2s = ["stm32_i2s_v12x"]
137+
i2s = ["dep:stm32_i2s_v12x"]
138138

139139
## USB OTG-FS peripheral support. See [synopsys-usb-otg](https://crates.io/crates/synopsys-usb-otg)
140140
usb_fs = ["dep:synopsys-usb-otg", "synopsys-usb-otg/fs"]

src/i2s.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::pac;
1212
use crate::rcc::{self, Clocks, Reset};
1313
use fugit::HertzU32 as Hertz;
1414

15-
#[cfg(feature = "stm32_i2s_v12x")]
15+
#[cfg(feature = "i2s")]
1616
pub use stm32_i2s_v12x;
1717

1818
// I2S pins are mostly the same as the corresponding SPI pins:
@@ -202,7 +202,7 @@ macro_rules! i2s {
202202
}
203203
}
204204

205-
#[cfg(feature = "stm32_i2s_v12x")]
205+
#[cfg(feature = "i2s")]
206206
impl stm32_i2s_v12x::WsPin for gpio::alt::$i2s::Ws {
207207
fn is_high(&self) -> bool {
208208
use crate::gpio::ReadPin;
@@ -214,7 +214,7 @@ macro_rules! i2s {
214214
}
215215
}
216216

217-
#[cfg(feature = "stm32_i2s_v12x")]
217+
#[cfg(feature = "i2s")]
218218
unsafe impl stm32_i2s_v12x::I2sPeripheral for I2s<$SPI>
219219
where
220220
$SPI: rcc::Reset,
@@ -375,7 +375,7 @@ macro_rules! dual_i2s {
375375
type I2sExtPeripheral = $I2SEXT;
376376
}
377377

378-
#[cfg(feature = "stm32_i2s_v12x")]
378+
#[cfg(feature = "i2s")]
379379
unsafe impl stm32_i2s_v12x::DualI2sPeripheral for DualI2s<$SPI>
380380
where
381381
$SPI: rcc::Reset,
@@ -420,7 +420,7 @@ dual_i2s!(pac::SPI3, pac::I2S3EXT, DualI2s3, i2s3, i2s_clk);
420420
dual_i2s!(pac::SPI3, pac::I2S3EXT, DualI2s3, i2s3, i2s_apb1_clk);
421421

422422
// DMA support: reuse existing mappings for SPI
423-
#[cfg(feature = "stm32_i2s_v12x")]
423+
#[cfg(feature = "i2s")]
424424
mod dma {
425425
use super::*;
426426
use crate::dma::traits::{DMASet, PeriAddress};

0 commit comments

Comments
 (0)