From 91c5d4515ece4f19d668eb3c422e3262acfdc9f9 Mon Sep 17 00:00:00 2001 From: DanKoloff Date: Mon, 10 Jul 2023 16:30:24 +0300 Subject: [PATCH 1/2] Olimex ESP32-GATEWAY fixes Fixes related to board revisions selection. --- boards.txt | 4 ++- variants/esp32-gateway/pins_arduino.h | 47 --------------------------- 2 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 variants/esp32-gateway/pins_arduino.h diff --git a/boards.txt b/boards.txt index a66ec14bac7..daa48a605e6 100644 --- a/boards.txt +++ b/boards.txt @@ -11755,7 +11755,7 @@ esp32-gateway.menu.Revision.RevC=Revision C or older esp32-gateway.menu.Revision.RevC.build.board=ESP32_GATEWAY_C esp32-gateway.menu.Revision.RevE=Revision E esp32-gateway.menu.Revision.RevE.build.board=ESP32_GATEWAY_E -esp32-gateway.menu.Revision.RevF=Revision F +esp32-gateway.menu.Revision.RevF=Revision F or newer esp32-gateway.menu.Revision.RevF.build.board=ESP32_GATEWAY_F esp32-gateway.build.f_cpu=240000000L @@ -11770,6 +11770,8 @@ esp32-gateway.menu.FlashFreq.80.build.flash_freq=80m esp32-gateway.menu.FlashFreq.40=40MHz esp32-gateway.menu.FlashFreq.40.build.flash_freq=40m +esp32-gateway.menu.UploadSpeed.921600=921600 +esp32-gateway.menu.UploadSpeed.921600.upload.speed=921600 esp32-gateway.menu.UploadSpeed.115200=115200 esp32-gateway.menu.UploadSpeed.115200.upload.speed=115200 diff --git a/variants/esp32-gateway/pins_arduino.h b/variants/esp32-gateway/pins_arduino.h deleted file mode 100644 index b2b6f065558..00000000000 --- a/variants/esp32-gateway/pins_arduino.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 40 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1) -#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) -#define digitalPinHasPWM(p) (p < 34) - -#if ARDUINO_ESP32_GATEWAY >= 'D' -#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT -#define ETH_PHY_POWER 5 -#endif - -static const uint8_t LED_BUILTIN = 33; -#define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN - -static const uint8_t KEY_BUILTIN = 34; - -static const uint8_t SCL = 16; // This is extention pin 11 -static const uint8_t SDA = 32; // This is extention pin 13 - -static const uint8_t SS = 5; -static const uint8_t MOSI = 23; -static const uint8_t MISO = 19; -static const uint8_t SCK = 18; - -static const uint8_t TX = 1; -static const uint8_t RX = 3; - -static const uint8_t A0 = 36; -static const uint8_t A3 = 39; -static const uint8_t A4 = 32; -static const uint8_t A7 = 35; - -static const uint8_t T9 = 32; - -#if ARDUINO_ESP32_GATEWAY >= 'F' -#define BOARD_HAS_1BIT_SDMMC -#endif - -#endif /* Pins_Arduino_h */ From 25ff63ea1bf45151c6b0bf4917df26a76807e559 Mon Sep 17 00:00:00 2001 From: DanKoloff Date: Mon, 10 Jul 2023 16:48:08 +0300 Subject: [PATCH 2/2] Create pins_arduino.h --- variants/esp32-gateway/pins_arduino.h | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 variants/esp32-gateway/pins_arduino.h diff --git a/variants/esp32-gateway/pins_arduino.h b/variants/esp32-gateway/pins_arduino.h new file mode 100644 index 00000000000..5dd5d7e0fd9 --- /dev/null +++ b/variants/esp32-gateway/pins_arduino.h @@ -0,0 +1,47 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define EXTERNAL_NUM_INTERRUPTS 16 +#define NUM_DIGITAL_PINS 40 +#define NUM_ANALOG_INPUTS 16 + +#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1) +#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) +#define digitalPinHasPWM(p) (p < 34) + +#if defined (ARDUINO_ESP32_GATEWAY_E) || defined (ARDUINO_ESP32_GATEWAY_F) +#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT +#define ETH_PHY_POWER 5 +#endif + +static const uint8_t LED_BUILTIN = 33; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t KEY_BUILTIN = 34; + +static const uint8_t SCL = 16; // This is extention pin 11 +static const uint8_t SDA = 32; // This is extention pin 13 + +static const uint8_t SS = 5; +static const uint8_t MOSI = 23; +static const uint8_t MISO = 19; +static const uint8_t SCK = 18; + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t A0 = 36; +static const uint8_t A3 = 39; +static const uint8_t A4 = 32; +static const uint8_t A7 = 35; + +static const uint8_t T9 = 32; + +#if defined (ARDUINO_ESP32_GATEWAY_F) +#define BOARD_HAS_1BIT_SDMMC +#endif + +#endif /* Pins_Arduino_h */