Skip to content

Commit 7f51e8f

Browse files
committed
otg_hs::Dm/Dp
1 parent 873c3ea commit 7f51e8f

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

src/gpio/alt/h7.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,11 @@ pub mod eth {
608608
<TxClk, PushPull> for [
609609
PC3<11>,
610610
],
611+
}
611612

613+
// TODO: check
614+
//#[cfg(feature = "gpio-h747")]
615+
pin! {
612616
<Txd2, PushPull> for [
613617
PC2<11>,
614618
],
@@ -5317,6 +5321,18 @@ pub mod otg_hs {
53175321
],
53185322
}
53195323

5324+
// TODO: check this, absent in Cube-MX
5325+
#[cfg(any(feature = "gpio-h72", feature = "gpio-h7a2"))]
5326+
pin! {
5327+
<Dm, PushPull> for [
5328+
PA11<10>,
5329+
],
5330+
5331+
<Dp, PushPull> for [
5332+
PA12<10>,
5333+
],
5334+
}
5335+
53205336
pin! {
53215337
<Id, PushPull> for [
53225338
#[cfg(any(feature = "gpio-h72", feature = "gpio-h7a2"))]
@@ -5382,11 +5398,13 @@ pub mod otg_hs {
53825398
],
53835399
}
53845400

5385-
#[cfg(any(feature = "gpio-h747", feature = "gpio-h7a2"))]
5401+
//#[cfg(any(feature = "gpio-h747", feature = "gpio-h7a2"))]
53865402
pin! {
53875403
<UlpiDir, PushPull> for [
5404+
// TODO: check
53885405
PC2<10, Speed::VeryHigh>,
53895406

5407+
#[cfg(any(feature = "gpio-h747", feature = "gpio-h7a2"))]
53905408
PI11<10, Speed::VeryHigh>,
53915409
],
53925410
}

src/usb_hs.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ pub struct USB1 {
3333
pub hclk: Hertz,
3434
}
3535
impl USB1 {
36-
#[cfg(any(feature = "rm0433", feature = "rm0399"))]
3736
pub fn new(
3837
usb_global: stm32::OTG1_HS_GLOBAL,
3938
usb_device: stm32::OTG1_HS_DEVICE,
@@ -47,20 +46,6 @@ impl USB1 {
4746
let _ = pin_dp.into();
4847
Self::new_unchecked(usb_global, usb_device, usb_pwrclk, prec, clocks)
4948
}
50-
#[cfg(any(feature = "rm0455", feature = "rm0468"))]
51-
pub fn new(
52-
usb_global: stm32::OTG1_HS_GLOBAL,
53-
usb_device: stm32::OTG1_HS_DEVICE,
54-
usb_pwrclk: stm32::OTG1_HS_PWRCLK,
55-
pin_dm: impl Into<gpio::alt::otg_fs::Dm>,
56-
pin_dp: impl Into<gpio::alt::otg_fs::Dp>,
57-
prec: rcc::rec::Usb1Otg,
58-
clocks: &rcc::CoreClocks,
59-
) -> Self {
60-
let _ = pin_dm.into();
61-
let _ = pin_dp.into();
62-
Self::new_unchecked(usb_global, usb_device, usb_pwrclk, prec, clocks)
63-
}
6449
pub fn new_unchecked(
6550
usb_global: stm32::OTG1_HS_GLOBAL,
6651
usb_device: stm32::OTG1_HS_DEVICE,

0 commit comments

Comments
 (0)