Skip to content

Commit

Permalink
STEVAL_3DP001V1: Easier Serial2 (for WIFI interface) (#16599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-the-Kuhn authored and thinkyhead committed Jan 20, 2020
1 parent 439e73d commit f6468f0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern "C" {
#define PA9 0 //TX
#define PA10 1 //RX

// WIFI
// WIFI (USART2)
#define PD3 2 // CTS
#define PD4 3 // RTS
#define PD5 4 // TX
Expand Down Expand Up @@ -183,12 +183,20 @@ extern "C" {
#define USER_BTN PE7

// 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)
// Mandatory for Firmata
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9
#if SERIAL_UART_INSTANCE == 1 // ST-Link & J23
#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
#define TIMER_SERVO TIM4 // TIMER_SERVO must be defined in this file
Expand Down

0 comments on commit f6468f0

Please sign in to comment.