Skip to content

Commit

Permalink
Fix feature use
Browse files Browse the repository at this point in the history
  • Loading branch information
mattico committed Feb 12, 2021
1 parent 22ad278 commit ccedfe5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Expand Up @@ -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
24 changes: 13 additions & 11 deletions src/usb_hs.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<USB1_ULPI>;

0 comments on commit ccedfe5

Please sign in to comment.