From 0dd997c920df5624aebd2cfeb5c5ccedb4bbf551 Mon Sep 17 00:00:00 2001 From: Patrick Van Oosterwijck Date: Wed, 30 Jan 2019 17:31:53 -0700 Subject: [PATCH 1/2] Add default pin mapping for Serial1 and Serial2 --- variants/wesp32/pins_arduino.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/variants/wesp32/pins_arduino.h b/variants/wesp32/pins_arduino.h index 1bb2b58b87b..3565791dc43 100644 --- a/variants/wesp32/pins_arduino.h +++ b/variants/wesp32/pins_arduino.h @@ -11,6 +11,11 @@ #define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinHasPWM(p) (p < 34) +#define TX1 13 +#define RX1 12 +#define TX2 33 +#define RX2 39 + static const uint8_t TX = 1; static const uint8_t RX = 3; @@ -39,6 +44,6 @@ static const uint8_t T9 = 32; #define ETH_PHY_MDC 16 #define ETH_PHY_MDIO 17 #define ETH_PHY_TYPE ETH_PHY_LAN8720 -#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN +#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN #endif /* Pins_Arduino_h */ From 8f385e1318211294f568db847106cd5f8591c40d Mon Sep 17 00:00:00 2001 From: Patrick Van Oosterwijck Date: Mon, 25 Feb 2019 14:06:04 -0700 Subject: [PATCH 2/2] Default pin remap on wESP32 Improved default pin mapping for I2C0 and UART1 to avoid issues with programming. SDA0 was on IO2 but IO2 needs to be pulled low on reset to enable serial programming, which conflicts with I2C pull-ups. RX1 was on IO12, idle UART level is high which conflicts with IO12 needing to be low on reset to select correct 3.3V flash voltage. New mappings: SDA0 on IO15 RX1 on IO13 TX1 on IO12 --- variants/wesp32/pins_arduino.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/variants/wesp32/pins_arduino.h b/variants/wesp32/pins_arduino.h index 3565791dc43..c3790504155 100644 --- a/variants/wesp32/pins_arduino.h +++ b/variants/wesp32/pins_arduino.h @@ -11,8 +11,8 @@ #define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinHasPWM(p) (p < 34) -#define TX1 13 -#define RX1 12 +#define TX1 12 +#define RX1 13 #define TX2 33 #define RX2 39 @@ -20,7 +20,7 @@ static const uint8_t TX = 1; static const uint8_t RX = 3; static const uint8_t SCL = 4; -static const uint8_t SDA = 2; +static const uint8_t SDA = 15; static const uint8_t SS = 5; static const uint8_t MOSI = 23;