mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-15 02:37:52 -06:00
stm32: Support PA11/PA12 pin remap on stm32f042 tsop20 chip
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
a6d90bb95e
commit
0b0c47c566
2 changed files with 12 additions and 0 deletions
|
@ -159,4 +159,12 @@ clock_setup(void)
|
|||
hsi48_setup();
|
||||
else
|
||||
pll_setup();
|
||||
|
||||
// Support alternate USB pins on stm32f042
|
||||
#ifdef SYSCFG_CFGR1_PA11_PA12_RMP
|
||||
if (CONFIG_STM32F042_USB_PIN_SWAP) {
|
||||
enable_pclock(SYSCFG_BASE);
|
||||
SYSCFG->CFGR1 |= SYSCFG_CFGR1_PA11_PA12_RMP;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue