Skip to content

Commit 7cc4c05

Browse files
committed
Make the dma module depend on the stm32f303 feature
1 parent f0b2580 commit 7cc4c05

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/dma.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Direct memory access (DMA) controller
2-
3-
// Currently DMA is only supported for STM32F303 MCUs.
4-
// Remove these `allow`s once all models have support.
5-
#![cfg_attr(not(feature = "stm32f303"), allow(unused_imports, unused_macros))]
2+
//!
3+
//! Currently DMA is only supported for STM32F303 MCUs.
64
75
use crate::{
86
rcc::AHB,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub use crate::pac::interrupt;
122122

123123
#[cfg(feature = "device-selected")]
124124
pub mod delay;
125-
#[cfg(feature = "device-selected")]
125+
#[cfg(feature = "stm32f303")]
126126
pub mod dma;
127127
#[cfg(feature = "device-selected")]
128128
pub mod flash;

src/prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Prelude
22
3+
#[cfg(feature = "stm32f303")]
34
pub use crate::dma::DmaExt as _stm32f3xx_hal_dma_DmaExt;
45
pub use crate::flash::FlashExt as _stm32f3xx_hal_flash_FlashExt;
56
pub use crate::gpio::GpioExt as _stm32f3xx_hal_gpio_GpioExt;

0 commit comments

Comments
 (0)