stm32: Simplify USB/Serial/CANbus Kconfig selection

Combine the various communication options into a single "make
menuconfig" menu item.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-03-18 13:20:54 -04:00
parent c8dc3afc23
commit 1eddc0fd90
29 changed files with 186 additions and 172 deletions

View file

@ -224,7 +224,8 @@ armcm_main(void)
// Support pin remapping USB/CAN pins on low pinout stm32f042
#ifdef SYSCFG_CFGR1_PA11_PA12_RMP
if (CONFIG_STM32F042_PIN_SWAP) {
if (CONFIG_STM32_USB_PA11_PA12_REMAP
|| CONFIG_STM32_CANBUS_PA11_PA12_REMAP) {
enable_pclock(SYSCFG_BASE);
SYSCFG->CFGR1 |= SYSCFG_CFGR1_PA11_PA12_RMP;
}