Skip to content

Commit

Permalink
Explicitly specify pins for Serial1 too
Browse files Browse the repository at this point in the history
  • Loading branch information
LinoBarreca authored and thinkyhead committed Jan 4, 2020
1 parent 6b40582 commit ab5fb98
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,13 @@ extern "C" {
#define TIMER_SERVO TIM6 //TODO: advanced-control timers don't work

// UART Definitions
//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below
#define ENABLE_HWSERIAL3
#define ENABLE_HWSERIAL6

// Define here Serial instance number to map on Serial generic name
#define SERIAL_UART_INSTANCE 1 //ex: 2 for Serial2 (USART2)
#define SERIAL_UART_INSTANCE 1 //1 for Serial = Serial1 (USART1)

// DEBUG_UART could be redefined to print on another instance than 'Serial'
//#define DEBUG_UART ((USART_TypeDef *) U(S)ARTX) // ex: USART3
// DEBUG_UART baudrate, default: 9600 if not defined
Expand All @@ -269,10 +271,13 @@ extern "C" {
// Mandatory for Firmata
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9

// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
// Used when user instanciate a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
#define PIN_SERIAL1_TX PA9
#define PIN_SERIAL3_RX PD9
#define PIN_SERIAL3_TX PD8
#define PIN_SERIAL6_RX PC7
Expand Down

0 comments on commit ab5fb98

Please sign in to comment.