Skip to content

Commit 1f85df1

Browse files
committed
Rust format.
1 parent 3fc9e5f commit 1f85df1

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

examples/otg_fs_serial.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
extern crate panic_semihosting;
88

99
use cortex_m_rt::entry;
10-
use stm32l4xx_hal::stm32::{RCC, CRS, PWR, Peripherals};
11-
use stm32l4xx_hal::rcc::{PllConfig, PllDivider, PllSource, MsiFreq, CrystalBypass, ClockSecuritySystem};
1210
use stm32l4xx_hal::gpio::Speed;
13-
use stm32l4xx_hal::otg_fs::{USB, UsbBus};
11+
use stm32l4xx_hal::otg_fs::{UsbBus, USB};
1412
use stm32l4xx_hal::prelude::*;
13+
use stm32l4xx_hal::rcc::{
14+
ClockSecuritySystem, CrystalBypass, MsiFreq, PllConfig, PllDivider, PllSource,
15+
};
16+
use stm32l4xx_hal::stm32::{Peripherals, CRS, PWR, RCC};
1517
use usb_device::prelude::*;
1618

1719
/// Enable CRS (Clock Recovery System)

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ pub mod gpio;
117117
feature = "stm32l4x6"
118118
))]
119119
pub mod i2c;
120-
#[cfg(all(feature = "otg_fs",
121-
any(feature = "stm32l4x5", feature = "stm32l4x6")
122-
))]
120+
#[cfg(all(feature = "otg_fs", any(feature = "stm32l4x5", feature = "stm32l4x6")))]
123121
pub mod otg_fs;
124122
#[cfg(any(
125123
feature = "stm32l4x1",

src/rcc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,8 @@ impl CFGR {
778778

779779
// MSI always starts on reset
780780
if self.msi.is_none() {
781-
rcc.cr.modify(|_, w| w.msion().clear_bit().msipllen().clear_bit())
781+
rcc.cr
782+
.modify(|_, w| w.msion().clear_bit().msipllen().clear_bit())
782783
}
783784

784785
//

0 commit comments

Comments
 (0)