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 =
# 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
/*\r
#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)\r
*/\r
-#define usb_lld_connect_bus(usbp)\r
+#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT);\r
\r
/*\r
* USB bus de-activation macro, required by the USB driver.\r
/*\r
#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC)\r
*/\r
-#define usb_lld_disconnect_bus(usbp)\r
+#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12);\r
\r
#if !defined(_FROM_ASM_)\r
#ifdef __cplusplus\r
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
/* generic STM32F103C8T6 board */
#ifdef BOARD_GENERIC_STM32_F103
- palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(GPIOC, 13);
#endif
/* Maple Mini */
#ifdef BOARD_MAPLEMINI_STM32_F103
- palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPad(GPIOB, 1);
#endif
} else {
- // Hi-Z
/* generic STM32F103C8T6 board */
#ifdef BOARD_GENERIC_STM32_F103
- palSetPadMode(GPIOC, 13, PAL_MODE_INPUT);
+ palSetPad(GPIOC, 13);
#endif
/* Maple Mini */
#ifdef BOARD_MAPLEMINI_STM32_F103
- palSetPadMode(GPIOB, 1, PAL_MODE_INPUT);
+ palClearPad(GPIOB,1);
#endif
}
}
/* Maple Mini */
#ifdef BOARD_MAPLEMINI_STM32_F103
-#define LED_ON() do { palClearPad(GPIOB, 1) ;} while (0)
-#define LED_OFF() do { palSetPad(GPIOB, 1); } while (0)
+#define LED_ON() do { palSetPad(GPIOB, 1) ;} while (0)
+#define LED_OFF() do { palClearPad(GPIOB, 1); } while (0)
#define LED_TGL() do { palTogglePad(GPIOB, 1); } while (0)
#endif