aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-01-14 23:20:51 +0100
committerDario Nieuwenhuis <[email protected]>2024-01-14 23:20:51 +0100
commit583555bc8ae58f615bff000277220d043eeb9827 (patch)
tree3059ce8082a880968463914910c8724bc6261bd2
parentec4cffe28c314b8cb69998fe0b5ddafbf4e092e8 (diff)
Suppress "unused" warnings.
-rw-r--r--embassy-stm32/src/usb/usb.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs
index 364076739..f39915906 100644
--- a/embassy-stm32/src/usb/usb.rs
+++ b/embassy-stm32/src/usb/usb.rs
@@ -13,7 +13,6 @@ use embassy_usb_driver::{
13}; 13};
14 14
15use super::{DmPin, DpPin, Instance}; 15use super::{DmPin, DpPin, Instance};
16use crate::gpio::sealed::AFType;
17use crate::interrupt::typelevel::Interrupt; 16use crate::interrupt::typelevel::Interrupt;
18use crate::pac::usb::regs; 17use crate::pac::usb::regs;
19use crate::pac::usb::vals::{EpType, Stat}; 18use crate::pac::usb::vals::{EpType, Stat};
@@ -287,10 +286,12 @@ impl<'d, T: Instance> Driver<'d, T> {
287 regs.btable().write(|w| w.set_btable(0)); 286 regs.btable().write(|w| w.set_btable(0));
288 287
289 #[cfg(not(stm32l1))] 288 #[cfg(not(stm32l1))]
290 dp.set_as_af(dp.af_num(), AFType::OutputPushPull); 289 {
291 290 dp.set_as_af(dp.af_num(), crate::gpio::sealed::AFType::OutputPushPull);
292 #[cfg(not(stm32l1))] 291 dm.set_as_af(dm.af_num(), crate::gpio::sealed::AFType::OutputPushPull);
293 dm.set_as_af(dm.af_num(), AFType::OutputPushPull); 292 }
293 #[cfg(stm32l1)]
294 let _ = (dp, dm); // suppress "unused" warnings.
294 295
295 // Initialize the bus so that it signals that power is available 296 // Initialize the bus so that it signals that power is available
296 BUS_WAKER.wake(); 297 BUS_WAKER.wake();