STM32F103x fixes.
This commit is contained in:
parent
b110884a6d
commit
7aab3bb21a
@ -20,9 +20,9 @@ endif
|
|||||||
CONFIG_H = config.h
|
CONFIG_H = config.h
|
||||||
|
|
||||||
# GENERIC STM32F103C8T6 board - stm32duino bootloader
|
# GENERIC STM32F103C8T6 board - stm32duino bootloader
|
||||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
|
OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
|
||||||
# MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
||||||
# BOARD = GENERIC_STM32_F103
|
BOARD = GENERIC_STM32_F103
|
||||||
|
|
||||||
# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
|
# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
|
||||||
# OPT_DEFS =
|
# OPT_DEFS =
|
||||||
@ -30,9 +30,9 @@ CONFIG_H = config.h
|
|||||||
# BOARD = GENERIC_STM32_F103
|
# BOARD = GENERIC_STM32_F103
|
||||||
|
|
||||||
# MAPLE MINI
|
# MAPLE MINI
|
||||||
OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
|
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
|
||||||
MCU_LDSCRIPT = STM32F103xE_maplemini_bootloader
|
# MCU_LDSCRIPT = STM32F103xE_maplemini_bootloader
|
||||||
BOARD = MAPLEMINI_STM32_F103
|
# BOARD = MAPLEMINI_STM32_F103
|
||||||
|
|
||||||
## chip/board settings
|
## chip/board settings
|
||||||
# the next two should match the directories in
|
# the next two should match the directories in
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
/*
|
/*
|
||||||
#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)
|
#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.
|
* 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) 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_)
|
#if !defined(_FROM_ASM_)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -24,23 +24,20 @@ void led_set(uint8_t usb_led)
|
|||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
/* generic STM32F103C8T6 board */
|
/* generic STM32F103C8T6 board */
|
||||||
#ifdef BOARD_GENERIC_STM32_F103
|
#ifdef BOARD_GENERIC_STM32_F103
|
||||||
palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palClearPad(GPIOC, 13);
|
palClearPad(GPIOC, 13);
|
||||||
#endif
|
#endif
|
||||||
/* Maple Mini */
|
/* Maple Mini */
|
||||||
#ifdef BOARD_MAPLEMINI_STM32_F103
|
#ifdef BOARD_MAPLEMINI_STM32_F103
|
||||||
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
palSetPad(GPIOB, 1);
|
palSetPad(GPIOB, 1);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// Hi-Z
|
|
||||||
/* generic STM32F103C8T6 board */
|
/* generic STM32F103C8T6 board */
|
||||||
#ifdef BOARD_GENERIC_STM32_F103
|
#ifdef BOARD_GENERIC_STM32_F103
|
||||||
palSetPadMode(GPIOC, 13, PAL_MODE_INPUT);
|
palSetPad(GPIOC, 13);
|
||||||
#endif
|
#endif
|
||||||
/* Maple Mini */
|
/* Maple Mini */
|
||||||
#ifdef BOARD_MAPLEMINI_STM32_F103
|
#ifdef BOARD_MAPLEMINI_STM32_F103
|
||||||
palSetPadMode(GPIOB, 1, PAL_MODE_INPUT);
|
palClearPad(GPIOB,1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,8 +63,8 @@ uint8_t matrix_cols(void)
|
|||||||
|
|
||||||
/* Maple Mini */
|
/* Maple Mini */
|
||||||
#ifdef BOARD_MAPLEMINI_STM32_F103
|
#ifdef BOARD_MAPLEMINI_STM32_F103
|
||||||
#define LED_ON() do { palClearPad(GPIOB, 1) ;} while (0)
|
#define LED_ON() do { palSetPad(GPIOB, 1) ;} while (0)
|
||||||
#define LED_OFF() do { palSetPad(GPIOB, 1); } while (0)
|
#define LED_OFF() do { palClearPad(GPIOB, 1); } while (0)
|
||||||
#define LED_TGL() do { palTogglePad(GPIOB, 1); } while (0)
|
#define LED_TGL() do { palTogglePad(GPIOB, 1); } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user