From ccedfe5c98d9532e7a206470c860721c3a83184a Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Fri, 12 Feb 2021 10:21:00 -0600 Subject: [PATCH] Fix feature use --- .github/workflows/clippy.yml | 2 +- src/usb_hs.rs | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 035420a3b..fea2adf9b 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -19,4 +19,4 @@ jobs: - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --examples --target thumbv7em-none-eabihf --features=rt,stm32h743v + args: --examples --target thumbv7em-none-eabihf --features=rt,stm32h743v -- -A clippy::empty_loop diff --git a/src/usb_hs.rs b/src/usb_hs.rs index a0c6fe77b..b7fb775c0 100644 --- a/src/usb_hs.rs +++ b/src/usb_hs.rs @@ -6,24 +6,25 @@ use crate::rcc; use crate::stm32; use crate::gpio::{ - gpioa::{PA11, PA12, PA3, PA5}, - gpiob::{PB0, PB1, PB10, PB11, PB12, PB13, PB5}, + gpioa::{PA11, PA12}, + Alternate, +}; + +#[cfg(not(feature = "rm0455"))] +use crate::gpio::{ + gpioa::{PA3, PA5}, + gpiob::{PB0, PB1, PB10, PB11, PB12, PB13, PB14, PB15, PB5}, gpioc::PC0, gpioc::{PC2, PC3}, gpioh::PH4, gpioi::PI11, - Alternate, AF10, -}; -#[cfg(not(feature = "rm0455"))] -use crate::gpio::{ - gpiob::{PB14, PB15}, - AF12, + AF10, AF12, }; use crate::time::Hertz; pub use synopsys_usb_otg::UsbBus; -use synopsys_usb_otg::{PhyType, UsbPeripheral}; +use synopsys_usb_otg::UsbPeripheral; #[cfg(not(feature = "rm0455"))] pub struct USB1 { @@ -201,8 +202,9 @@ unsafe impl UsbPeripheral for USB1_ULPI { self.hclk.0 } - fn phy_type(&self) -> PhyType { - PhyType::ExternalHighSpeed + fn phy_type(&self) -> synopsys_usb_otg::PhyType { + synopsys_usb_otg::PhyType::ExternalHighSpeed } } +#[cfg(not(feature = "rm0455"))] pub type Usb1UlpiBusType = UsbBus;