aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/swlink/platform.h
diff options
context:
space:
mode:
authorGareth McMullin2014-10-16 13:19:34 -0700
committerGareth McMullin2014-10-16 13:50:56 -0700
commita5549d630c3c261e7d52cb245d945e54f011a3e7 (patch)
tree3dafd4329c35dc8420e90b1a0c890f94660ee7e1 /src/platforms/swlink/platform.h
parent60626e5bbe8761544cb195ceb3ec7c85ff1e246e (diff)
Whitespace cleanup.
Diffstat (limited to 'src/platforms/swlink/platform.h')
-rw-r--r--src/platforms/swlink/platform.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/platforms/swlink/platform.h b/src/platforms/swlink/platform.h
index fe3dc46..6683421 100644
--- a/src/platforms/swlink/platform.h
+++ b/src/platforms/swlink/platform.h
@@ -38,12 +38,12 @@
#define INLINE_GPIO
#define CDCACM_PACKET_SIZE 64
-#define BOARD_IDENT "Black Magic Probe (SWLINK), (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")"
-#define BOARD_IDENT_DFU "Black Magic (Upgrade), STM8S Discovery, (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")"
-#define BOARD_IDENT_UPD "Black Magic (DFU Upgrade), STM8S Discovery, (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")"
-#define DFU_IDENT "Black Magic Firmware Upgrade (SWLINK)"
-#define DFU_IFACE_STRING "@Internal Flash /0x08000000/8*001Ka,56*001Kg"
-#define UPD_IFACE_STRING "@Internal Flash /0x08000000/8*001Kg"
+#define BOARD_IDENT "Black Magic Probe (SWLINK), (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")"
+#define BOARD_IDENT_DFU "Black Magic (Upgrade), STM8S Discovery, (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")"
+#define BOARD_IDENT_UPD "Black Magic (DFU Upgrade), STM8S Discovery, (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")"
+#define DFU_IDENT "Black Magic Firmware Upgrade (SWLINK)"
+#define DFU_IFACE_STRING "@Internal Flash /0x08000000/8*001Ka,56*001Kg"
+#define UPD_IFACE_STRING "@Internal Flash /0x08000000/8*001Kg"
extern usbd_device *usbdev;
#define CDCACM_GDB_ENDPOINT 1
@@ -86,26 +86,25 @@ extern usbd_device *usbdev;
#define LED_PORT_UART GPIOC
#define LED_UART GPIO14
-#define TMS_SET_MODE() \
- gpio_set_mode(TMS_PORT, GPIO_MODE_OUTPUT_50_MHZ, \
- GPIO_CNF_OUTPUT_PUSHPULL, TMS_PIN);
-#define SWDIO_MODE_FLOAT() \
- gpio_set_mode(SWDIO_PORT, GPIO_MODE_INPUT, \
- GPIO_CNF_INPUT_FLOAT, SWDIO_PIN);
-#define SWDIO_MODE_DRIVE() \
- gpio_set_mode(SWDIO_PORT, GPIO_MODE_OUTPUT_50_MHZ, \
- GPIO_CNF_OUTPUT_PUSHPULL, SWDIO_PIN);
-
-#define UART_PIN_SETUP() do \
- { \
- AFIO_MAPR |= AFIO_MAPR_USART1_REMAP; \
- gpio_set_mode(USBUSART_PORT, GPIO_MODE_OUTPUT_2_MHZ, \
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, USBUSART_TX_PIN); \
- } while (0)
+#define TMS_SET_MODE() \
+ gpio_set_mode(TMS_PORT, GPIO_MODE_OUTPUT_50_MHZ, \
+ GPIO_CNF_OUTPUT_PUSHPULL, TMS_PIN);
+#define SWDIO_MODE_FLOAT() \
+ gpio_set_mode(SWDIO_PORT, GPIO_MODE_INPUT, \
+ GPIO_CNF_INPUT_FLOAT, SWDIO_PIN);
+#define SWDIO_MODE_DRIVE() \
+ gpio_set_mode(SWDIO_PORT, GPIO_MODE_OUTPUT_50_MHZ, \
+ GPIO_CNF_OUTPUT_PUSHPULL, SWDIO_PIN);
+
+#define UART_PIN_SETUP() do { \
+ AFIO_MAPR |= AFIO_MAPR_USART1_REMAP; \
+ gpio_set_mode(USBUSART_PORT, GPIO_MODE_OUTPUT_2_MHZ, \
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, USBUSART_TX_PIN); \
+} while (0)
#define USB_DRIVER stm32f103_usb_driver
#define USB_IRQ NVIC_USB_LP_CAN_RX0_IRQ
-#define USB_ISR usb_lp_can_rx0_isr
+#define USB_ISR usb_lp_can_rx0_isr
/* Interrupt priorities. Low numbers are high priority.
* For now USART1 preempts USB which may spin while buffer is drained.
* TIM2 is used for traceswo capture and must be highest priority.