Skip to content

Commit 8e3b982

Browse files
Remove interrupt free section in remap_pins
Since we take `&mut` references, there's no reason disable interrupts
1 parent 3c8d1b4 commit 8e3b982

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/usb.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ unsafe impl UsbPeripheral for Peripheral {
4949
/// Remap PA11/PA12 pins to PA09/PA10 for USB on
5050
/// TSSOP20 (STM32F042F) or UFQFPN28 (STM32F042G) packages
5151
pub fn remap_pins(rcc: &mut RCC, syscfg: &mut SYSCFG) {
52-
cortex_m::interrupt::free(|_| {
53-
rcc.apb2enr.modify(|_, w| w.syscfgen().set_bit());
54-
syscfg.cfgr1.modify(|_, w| w.pa11_pa12_rmp().remapped());
55-
});
52+
rcc.apb2enr.modify(|_, w| w.syscfgen().set_bit());
53+
syscfg.cfgr1.modify(|_, w| w.pa11_pa12_rmp().remapped());
5654
}
5755

5856
pub type UsbBusType = UsbBus<Peripheral>;

0 commit comments

Comments
 (0)