Skip to content

Commit 3a09920

Browse files
committed
clean attr
1 parent 853a500 commit 3a09920

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

src/dma/traits/f4.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ dma_map!(
119119
(Stream2<DMA1>:3, pac::I2C3, [PeripheralToMemory]), //I2C3_RX:DMA_CHANNEL_3
120120
);
121121

122-
#[cfg(any(feature = "gpio-f401", feature = "gpio-f411",))]
122+
#[cfg(any(feature = "gpio-f401", feature = "gpio-f411"))]
123123
dma_map!(
124124
(Stream1<DMA1>:3, timer::CCR3<pac::TIM2>, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_CH3
125125
(Stream1<DMA1>:3, timer::DMAR<pac::TIM2>, [MemoryToPeripheral | PeripheralToMemory]), //TIM2_UP
@@ -253,15 +253,15 @@ dma_map!(
253253
);
254254
*/
255255

256-
#[cfg(any(feature = "gpio-f417", feature = "gpio-f427", feature = "gpio-f469",))]
256+
#[cfg(any(feature = "gpio-f417", feature = "gpio-f427", feature = "gpio-f469"))]
257257
dma_map!(
258258
(Stream2<DMA1>:3, pac::I2C3, [PeripheralToMemory]), //I2C3_RX
259259
(Stream5<DMA2>:2, pac::CRYP, [PeripheralToMemory]), //CRYP_OUT
260260
(Stream6<DMA2>:2, pac::CRYP, [MemoryToPeripheral]), //CRYP_IN
261261
(Stream7<DMA2>:2, pac::HASH, [MemoryToPeripheral]), //HASH_IN
262262
);
263263

264-
#[cfg(any(feature = "gpio-f417", feature = "gpio-f427", feature = "gpio-f469",))]
264+
#[cfg(any(feature = "gpio-f417", feature = "gpio-f427", feature = "gpio-f469"))]
265265
address!((pac::HASH, din, u32), (pac::CRYP, din, u32),);
266266

267267
#[cfg(feature = "cryp")]
@@ -366,7 +366,7 @@ dma_map!(
366366
))]
367367
address!((pac::SPI5, dr, u8),);
368368

369-
#[cfg(any(feature = "gpio-f411", feature = "gpio-f412", feature = "gpio-f413",))]
369+
#[cfg(any(feature = "gpio-f411", feature = "gpio-f412", feature = "gpio-f413"))]
370370
dma_map!(
371371
(Stream4<DMA2>:4, pac::SPI4, [PeripheralToMemory]), //SPI4_RX
372372
);
@@ -426,15 +426,15 @@ dma_map!(
426426
#[cfg(feature = "quadspi")]
427427
address!((pac::QUADSPI, dr, u32),);
428428

429-
#[cfg(any(feature = "gpio-f413", feature = "gpio-f427", feature = "gpio-f469",))]
429+
#[cfg(any(feature = "gpio-f413", feature = "gpio-f427", feature = "gpio-f469"))]
430430
dma_map!(
431431
(Stream0<DMA1>:5, pac::UART8, [MemoryToPeripheral]), //UART8_TX
432432
(Stream1<DMA1>:5, pac::UART7, [MemoryToPeripheral]), //UART7_TX
433433
(Stream3<DMA1>:5, pac::UART7, [PeripheralToMemory]), //UART7_RX
434434
(Stream6<DMA1>:5, pac::UART8, [PeripheralToMemory]), //UART8_RX
435435
);
436436

437-
#[cfg(any(feature = "gpio-f413", feature = "gpio-f427", feature = "gpio-f469",))]
437+
#[cfg(any(feature = "gpio-f413", feature = "gpio-f427", feature = "gpio-f469"))]
438438
address!((pac::UART7, dr, u8), (pac::UART8, dr, u8),);
439439

440440
#[cfg(feature = "gpio-f413")]
@@ -522,7 +522,7 @@ dma_map!(
522522
//(Stream6<DMA1>:0, SPDIFRX_CS, [PeripheralToMemory]), //SPDIF_RX_CS
523523
);
524524

525-
#[cfg(any(feature = "gpio-f410", feature = "gpio-f412", feature = "gpio-f413",))]
525+
#[cfg(any(feature = "gpio-f410", feature = "gpio-f412", feature = "gpio-f413"))]
526526
dma_map!(
527527
(Stream0<DMA1>:7, pac::FMPI2C1, [PeripheralToMemory]), //FMPI2C1_RX
528528
(Stream1<DMA1>:2, pac::FMPI2C1, [MemoryToPeripheral]), //FMPI2C1_TX

src/i2s.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ macro_rules! i2s {
245245

246246
#[cfg(any(feature = "gpio-f410", feature = "gpio-f411"))]
247247
i2s!(pac::SPI1, I2s1, i2s1, i2s_clk);
248-
#[cfg(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446",))]
248+
#[cfg(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446"))]
249249
i2s!(pac::SPI1, I2s1, i2s1, i2s_apb2_clk);
250250

251251
// All STM32F4 models support SPI2/I2S2
252-
#[cfg(not(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446",)))]
252+
#[cfg(not(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446")))]
253253
i2s!(pac::SPI2, I2s2, i2s2, i2s_clk);
254-
#[cfg(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446",))]
254+
#[cfg(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446"))]
255255
i2s!(pac::SPI2, I2s2, i2s2, i2s_apb1_clk);
256256

257257
// All STM32F4 models except STM32F410 support SPI3/I2S3
@@ -263,7 +263,7 @@ i2s!(pac::SPI2, I2s2, i2s2, i2s_apb1_clk);
263263
feature = "gpio-f469",
264264
))]
265265
i2s!(pac::SPI3, I2s3, i2s3, i2s_clk);
266-
#[cfg(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446",))]
266+
#[cfg(any(feature = "gpio-f412", feature = "gpio-f413", feature = "gpio-f446"))]
267267
i2s!(pac::SPI3, I2s3, i2s3, i2s_apb1_clk);
268268

269269
#[cfg(feature = "gpio-f411")]

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub use crate::pac::interrupt;
8686

8787
pub mod adc;
8888
pub mod bb;
89-
#[cfg(all(feature = "can", any(feature = "can1", feature = "can2",)))]
89+
#[cfg(all(feature = "can", any(feature = "can1", feature = "can2")))]
9090
pub mod can;
9191
pub mod crc32;
9292
#[cfg(feature = "dac")]
@@ -98,7 +98,7 @@ pub mod i2c;
9898
pub mod i2s;
9999
#[cfg(all(feature = "usb_fs", feature = "otg-fs"))]
100100
pub mod otg_fs;
101-
#[cfg(all(any(feature = "usb_hs", docsrs), feature = "otg-hs",))]
101+
#[cfg(all(any(feature = "usb_hs", docsrs), feature = "otg-hs"))]
102102
pub mod otg_hs;
103103

104104
#[cfg(feature = "rng")]

src/otg_hs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ unsafe impl UsbPeripheral for USB {
4949
const HIGH_SPEED: bool = true;
5050
const FIFO_DEPTH_WORDS: usize = 1024;
5151

52-
#[cfg(any(feature = "gpio-f417", feature = "gpio-f427",))]
52+
#[cfg(any(feature = "gpio-f417", feature = "gpio-f427"))]
5353
const ENDPOINT_COUNT: usize = 6;
5454
#[cfg(any(feature = "gpio-f446", feature = "gpio-f469"))]
5555
const ENDPOINT_COUNT: usize = 9;

src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub use embedded_hal_nb::serial::Write as _embedded_hal_serial_nb_Write;
4747
pub use fugit::ExtU32 as _fugit_ExtU32;
4848
pub use fugit::RateExtU32 as _fugit_RateExtU32;
4949

50-
#[cfg(all(feature = "can", any(feature = "can1", feature = "can2",)))]
50+
#[cfg(all(feature = "can", any(feature = "can1", feature = "can2")))]
5151
pub use crate::can::CanExt as _stm32f4xx_hal_can_CanExt;
5252
#[cfg(feature = "dac")]
5353
pub use crate::dac::DacExt as _stm32f4xx_hal_dac_DacExt;

src/rcc/pll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,14 @@ impl I2sPll {
317317
}
318318
}
319319

320-
#[cfg(any(feature = "gpio-f427", feature = "gpio-f446", feature = "gpio-f469",))]
320+
#[cfg(any(feature = "gpio-f427", feature = "gpio-f446", feature = "gpio-f469"))]
321321
pub struct SaiPll {
322322
pub use_pll: bool,
323323
/// SAI clock (PLL output divided by the SAI clock divider).
324324
pub sai_clk: Option<u32>,
325325
}
326326

327-
#[cfg(any(feature = "gpio-f427", feature = "gpio-f446", feature = "gpio-f469",))]
327+
#[cfg(any(feature = "gpio-f427", feature = "gpio-f446", feature = "gpio-f469"))]
328328
impl SaiPll {
329329
pub fn unused() -> SaiPll {
330330
SaiPll {
@@ -349,7 +349,7 @@ impl SaiPll {
349349
pll
350350
}
351351

352-
#[cfg(any(feature = "gpio-f427", feature = "gpio-f469",))]
352+
#[cfg(any(feature = "gpio-f427", feature = "gpio-f469"))]
353353
pub fn setup_shared_m(pllsrcclk: u32, m: Option<u32>, sai_clk: Option<u32>) -> SaiPll {
354354
// "m" is None if both other PLLs are not in use.
355355
let Some(m) = m else {

0 commit comments

Comments
 (0)