mirror of https://github.com/Desuuuu/klipper.git
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
|
@ -124,6 +124,10 @@ config USBSERIAL
|
||||||
bool "Use USB for communication (instead of serial)"
|
bool "Use USB for communication (instead of serial)"
|
||||||
depends on HAVE_STM32_USBFS || HAVE_STM32_USBOTG
|
depends on HAVE_STM32_USBFS || HAVE_STM32_USBOTG
|
||||||
default y
|
default y
|
||||||
|
config STM32F042_USB_PIN_SWAP
|
||||||
|
bool "Use PA9/PA10 for USB" if MACH_STM32F042
|
||||||
|
depends on USBSERIAL && MACH_STM32F042
|
||||||
|
default n
|
||||||
config SERIAL
|
config SERIAL
|
||||||
depends on !USBSERIAL
|
depends on !USBSERIAL
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -159,4 +159,12 @@ clock_setup(void)
|
||||||
hsi48_setup();
|
hsi48_setup();
|
||||||
else
|
else
|
||||||
pll_setup();
|
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…
Reference in New Issue