STEVAL_3DP001V1: Easier Serial2 (for WIFI interface) (#16599)

This commit is contained in:
Bob Kuhn 2020-01-19 22:27:20 -06:00 committed by Scott Lahteine
parent 439e73d79c
commit f6468f0af3

View file

@ -51,7 +51,7 @@ extern "C" {
#define PA9 0 //TX #define PA9 0 //TX
#define PA10 1 //RX #define PA10 1 //RX
// WIFI // WIFI (USART2)
#define PD3 2 // CTS #define PD3 2 // CTS
#define PD4 3 // RTS #define PD4 3 // RTS
#define PD5 4 // TX #define PD5 4 // TX
@ -183,12 +183,20 @@ extern "C" {
#define USER_BTN PE7 #define USER_BTN PE7
// UART Definitions // UART Definitions
#define SERIAL_UART_INSTANCE 1 //Connected to ST-Link #define SERIAL_UART_INSTANCE 1 // Connected to ST-Link
//#define SERIAL_UART_INSTANCE 2 // Connected to WIFI
// Default pin used for 'Serial' instance (ex: ST-Link) // Default pin used for 'Serial' instance (ex: ST-Link)
// Mandatory for Firmata // Mandatory for Firmata
#define PIN_SERIAL_RX PA10 #if SERIAL_UART_INSTANCE == 1 // ST-Link & J23
#define PIN_SERIAL_TX PA9 #define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9
#elif SERIAL_UART_INSTANCE == 2 // WIFI interface
#define PIN_SERIAL2_RX PD6
#define PIN_SERIAL2_TX PD5
#else
#error'Invaqlid setting for SERIAL_UART_INSTANCE'
#endif
// Timer Definitions // Timer Definitions
#define TIMER_SERVO TIM4 // TIMER_SERVO must be defined in this file #define TIMER_SERVO TIM4 // TIMER_SERVO must be defined in this file