aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/native/platform.h
diff options
context:
space:
mode:
authorUwe Bonnes2013-01-12 20:44:43 +0100
committerUwe Bonnes2013-01-21 11:02:43 +0100
commit35d6adc236f54e94231b1959eb2d16b785c7733a (patch)
tree3236deebb77ede4fee4ee78244030cc656567e97 /src/platforms/native/platform.h
parent16b9c1e83f5887b8572ad7f4955e586e1fc2ae9d (diff)
native/usbuart: Move platform dependant parts to platform.h
Diffstat (limited to 'src/platforms/native/platform.h')
-rw-r--r--src/platforms/native/platform.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/platforms/native/platform.h b/src/platforms/native/platform.h
index 17841ea..30f063d 100644
--- a/src/platforms/native/platform.h
+++ b/src/platforms/native/platform.h
@@ -90,6 +90,7 @@ extern usbd_device *usbdev;
#define USB_VBUS_IRQ NVIC_EXTI15_10_IRQ
#define LED_PORT GPIOB
+#define LED_PORT_UART GPIOB
#define LED_UART GPIO2
#define LED_IDLE_RUN GPIO10
#define LED_ERROR GPIO11
@@ -99,10 +100,19 @@ extern usbd_device *usbdev;
* TIM3 is used for traceswo capture and must be highest priority.
*/
#define IRQ_PRI_USB (2 << 4)
-#define IRQ_PRI_USART1 (1 << 4)
+#define IRQ_PRI_USBUSART (1 << 4)
#define IRQ_PRI_USB_VBUS (14 << 4)
#define IRQ_PRI_TIM3 (0 << 4)
+#define USBUSART USART1
+#define USBUSART_CR1 USART1_CR1
+#define USBUSART_IRQ NVIC_USART1_IRQ
+#define USBUSART_APB_ENR RCC_APB2ENR
+#define USBUSART_CLK_ENABLE RCC_APB2ENR_USART1EN
+#define USBUSART_PORT GPIOA
+#define USBUSART_TX_PIN GPIO9
+#define USBUSART_ISR usart1_isr
+
#define DEBUG(...)
extern uint8_t running_status;
@@ -174,4 +184,3 @@ static inline u16 _gpio_get(u32 gpioport, u16 gpios)
#endif
#endif
-