From: flabbergast Date: Thu, 3 Dec 2015 09:24:49 +0000 (+0000) Subject: STM32F103x fixes. X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=7aab3bb21a3a62ce85a1f4b042508a335d6ed028;p=max%2Ftmk_keyboard.git STM32F103x fixes. --- diff --git a/keyboard/stm32_f103_onekey/Makefile b/keyboard/stm32_f103_onekey/Makefile index 89e58144..79ca4238 100644 --- a/keyboard/stm32_f103_onekey/Makefile +++ b/keyboard/stm32_f103_onekey/Makefile @@ -20,9 +20,9 @@ endif CONFIG_H = config.h # GENERIC STM32F103C8T6 board - stm32duino bootloader -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 -# MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -# BOARD = GENERIC_STM32_F103 +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 # GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD) # OPT_DEFS = @@ -30,9 +30,9 @@ CONFIG_H = config.h # BOARD = GENERIC_STM32_F103 # MAPLE MINI -OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000 -MCU_LDSCRIPT = STM32F103xE_maplemini_bootloader -BOARD = MAPLEMINI_STM32_F103 +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000 +# MCU_LDSCRIPT = STM32F103xE_maplemini_bootloader +# BOARD = MAPLEMINI_STM32_F103 ## chip/board settings # the next two should match the directories in diff --git a/keyboard/stm32_f103_onekey/boards/GENERIC_STM32_F103/board.h b/keyboard/stm32_f103_onekey/boards/GENERIC_STM32_F103/board.h index ef7318ee..7253e778 100644 --- a/keyboard/stm32_f103_onekey/boards/GENERIC_STM32_F103/board.h +++ b/keyboard/stm32_f103_onekey/boards/GENERIC_STM32_F103/board.h @@ -143,7 +143,7 @@ /* #define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) */ -#define usb_lld_connect_bus(usbp) +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); /* * USB bus de-activation macro, required by the USB driver. @@ -151,7 +151,7 @@ /* #define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) */ -#define usb_lld_disconnect_bus(usbp) +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboard/stm32_f103_onekey/led.c b/keyboard/stm32_f103_onekey/led.c index 3c86963c..f5c55f7d 100644 --- a/keyboard/stm32_f103_onekey/led.c +++ b/keyboard/stm32_f103_onekey/led.c @@ -24,23 +24,20 @@ void led_set(uint8_t usb_led) if (usb_led & (1<