From 07d90df861c646a4f7d71a6ee0716606769a654c Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Fri, 28 Aug 2020 15:47:59 +0200 Subject: [PATCH] add config for the heltec boards --- platformio.ini | 8 ++++++++ src/pins.h | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/platformio.ini b/platformio.ini index a29ed90..089bed6 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,6 +23,14 @@ check_flags = #upload_protocol = espota #upload_port = .local +[env:heltec_wifi_lora_32_V1] +board = ttgo-lora32-v1 +build_flags = -DHELTEC_WIFI_LORA_32_V1 + +[env:heltec_wifi_lora_32_V2] +board = ttgo-lora32-v1 +build_flags = -DHELTEC_WIFI_LORA_32_V2 + [env:ttgo-lora32-v1] board = ttgo-lora32-v1 diff --git a/src/pins.h b/src/pins.h index a0835ad..34ce13a 100644 --- a/src/pins.h +++ b/src/pins.h @@ -1,6 +1,24 @@ #ifndef PINS_H_ #define PINS_H_ +#ifndef DHELTEC_WIFI_LORA_32_V1 + #undef OLED_SDA + #undef OLED_SCL + #undef OLED_RST + #define OLED_SDA 4 + #define OLED_SCL 15 + #define OLED_RST 16 +#endif + +#ifndef DHELTEC_WIFI_LORA_32_V2 + #undef OLED_SDA + #undef OLED_SCL + #undef OLED_RST + #define OLED_SDA 4 + #define OLED_SCL 15 + #define OLED_RST 16 +#endif + #ifdef ARDUINO_LORA32_V2 #undef OLED_SDA #undef OLED_SCL