From 003c9d202aeeb428640cecfece1c20f9bcd7ddbd Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 27 Sep 2016 23:05:26 +0000 Subject: usb-serial: functional on f1. --- tests/usb-serial-rs485/syscfg.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'tests/usb-serial-rs485/syscfg.h') diff --git a/tests/usb-serial-rs485/syscfg.h b/tests/usb-serial-rs485/syscfg.h index 7e2a6d8..50d36e4 100644 --- a/tests/usb-serial-rs485/syscfg.h +++ b/tests/usb-serial-rs485/syscfg.h @@ -24,7 +24,20 @@ extern "C" { #endif +#define STIMULUS_RING_DRAIN 2 +#define STIMULUS_RING_PUSH 3 +#define STIMULUS_TXC 4 +#define STIMULUS_TX 5 + +#if defined STM32F1 +#define LED_RX_PORT GPIOC +#define LED_RX_PIN GPIO13 +#define LED_TX_PORT GPIOC +#define LED_TX_PIN GPIO13 +#define RS485DE_PORT GPIOB +#define RS485DE_PIN GPIO9 // FIXME? (disconnected, just a pin)) /* TODO: should really make a stm32f4discovery.h file... */ +#elif defined STM32F4 #define LED_RX_PORT GPIOD #define LED_RX_PIN GPIO15 /* Blue, but you won't see this one much */ @@ -35,11 +48,7 @@ extern "C" { #define RS485DE_PIN GPIO14 /* red */ #define STREAM_USART2_TX 6 - -#define STIMULUS_RING_DRAIN 2 -#define STIMULUS_RING_PUSH 3 -#define STIMULUS_TXC 4 -#define STIMULUS_TX 5 +#endif #ifdef __cplusplus -- cgit