We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
remap_pins
1 parent ed59f51 commit 3c8d1b4Copy full SHA for 3c8d1b4
src/usb.rs
@@ -46,10 +46,10 @@ unsafe impl UsbPeripheral for Peripheral {
46
}
47
48
49
+/// Remap PA11/PA12 pins to PA09/PA10 for USB on
50
+/// TSSOP20 (STM32F042F) or UFQFPN28 (STM32F042G) packages
51
pub fn remap_pins(rcc: &mut RCC, syscfg: &mut SYSCFG) {
52
cortex_m::interrupt::free(|_| {
- // Remap PA11/PA12 pins to PA09/PA10 for USB on
- // TSSOP20 (STM32F042F) or UFQFPN28 (STM32F042G) packages
53
rcc.apb2enr.modify(|_, w| w.syscfgen().set_bit());
54
syscfg.cfgr1.modify(|_, w| w.pa11_pa12_rmp().remapped());
55
});
0 commit comments