[ESP32] Allow user to define pins for hardware Serial1 and Serial2 (#16918)

This commit is contained in:
vivian-ng
2020-02-22 19:00:10 +09:00
committed by GitHub
parent 484e1a624c
commit eeec4c27e7
3 changed files with 40 additions and 1 deletions

View File

@ -101,3 +101,10 @@
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
// Hardware serial pins
// Add the following to Configuration.h or Configuration_adv.h to assign
// specific pins to hardware Serial1.
// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
// MRR ESPA does not have enough spare pins for such reassignment.
//#define HARDWARE_SERIAL1_RX 21
//#define HARDWARE_SERIAL1_TX 22

View File

@ -139,7 +139,7 @@
#define BEEPER_PIN 151
//#define LCD_PINS_D5 150
//#define LCD_PINS_D6 151
//#define LCD_PINS_D6 152
//#define LCD_PINS_D7 153
#else
@ -153,3 +153,13 @@
#define BTN_ENC 14
#endif // HAS_GRAPHICAL_LCD
// Hardware serial pins
// Add the following to Configuration.h or Configuration_adv.h to assign
// specific pins to hardware Serial1 and Serial2.
// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
// MRR ESPA does not have enough spare pins for such reassignment.
//#define HARDWARE_SERIAL1_RX 21
//#define HARDWARE_SERIAL1_TX 22
//#define HARDWARE_SERIAL2_RX 2
//#define HARDWARE_SERIAL2_TX 4