diff --git a/platformio.ini b/platformio.ini index 77490b1d..1450ac03 100644 --- a/platformio.ini +++ b/platformio.ini @@ -44,51 +44,113 @@ debug_tool = esp-prog [env:ttgo-lora32-v21] board = ttgo-lora32-v21 -build_flags = -Werror -Wall -DTTGO_T_LORA32_V2_1 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DTTGO_T_LORA32_V2_1 + -DHAS_SX127X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:heltec-lora32-v2] board = ttgo-lora32-v21 -build_flags = -Werror -Wall -DHELTEC_V2 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DHELTEC_V2 + -DHAS_SX127X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:heltec_wifi_lora_32_V3] board = heltec_wifi_lora_32_V3 -build_flags = -Werror -Wall -DHELTEC_V3 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 board_build.mcu = esp32s3 +build_flags = + -Werror -Wall + -DHELTEC_V3 + -DHAS_SX126X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:ESP32_DIY_LoRa] board = esp32dev -build_flags = -Werror -Wall -DESP32_DIY_LoRa -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DESP32_DIY_LoRa + -DHAS_SX127X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:ESP32_DIY_1W_LoRa] board = esp32dev -build_flags = -Werror -Wall -DESP32_DIY_1W_LoRa -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DESP32_DIY_1W_LoRa + -DHAS_SX126X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:ttgo-t-beam-v1_2] board = ttgo-t-beam -build_flags = -Werror -Wall -DTTGO_T_Beam_V1_2 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DTTGO_T_Beam_V1_2 + -DHAS_SX127X + -DHAS_AXP2101 + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:ttgo-t-beam-v1] board = ttgo-t-beam -build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DTTGO_T_Beam_V1_0 + -DHAS_SX127X + -DHAS_AXP192 + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:ttgo-t-beam-v1_SX1268] board = ttgo-t-beam -build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0_SX1268 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DTTGO_T_Beam_V1_0_SX1268 + -DHAS_SX126X + -DHAS_AXP192 + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:ttgo-t-beam-v1_2_SX1262] board = ttgo-t-beam -build_flags = -Werror -Wall -DTTGO_T_Beam_V1_2_SX1262 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DTTGO_T_Beam_V1_2_SX1262 + -DHAS_SX126X + -DHAS_AXP2101 + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:OE5HWN_MeshCom] board = esp32dev -build_flags = -Werror -Wall -DOE5HWN_MeshCom -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DOE5HWN_MeshCom + -DHAS_SX126X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:heltec_wireless_stick] board = heltec_wifi_lora_32_V3 board_build.mcu = esp32s3 -build_flags = -Werror -Wall -DHELTEC_WS -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +build_flags = + -Werror -Wall + -DHELTEC_WS + -DHAS_SX126X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 [env:heltec_wireless_stick_lite] board = heltec_wireless_stick_lite board_build.mcu = esp32c3 -build_flags = -Werror -Wall -DHELTEC_WSL -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 \ No newline at end of file +build_flags = + -Werror -Wall + -DHELTEC_WSL + -DHAS_SX126X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 + +[env:esp32_c3_DIY_LoRa] +board = esp32-c3-devkitm-1 +build_flags = + -Werror -Wall + -DESP32_C3_DIY_LoRa + -DHAS_SX127X + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 + -DARDUINO_USB_MODE=1 + -DARDUINO_USB_CDC_ON_BOOT=1 \ No newline at end of file diff --git a/src/pins_config.h b/src/pins_config.h index c10f083a..2050316f 100644 --- a/src/pins_config.h +++ b/src/pins_config.h @@ -7,21 +7,6 @@ #undef OLED_SCL #undef OLED_RST -#if defined(HELTEC_V3) || defined(HELTEC_WS) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(HELTEC_WSL) -#define HAS_SX126X -#endif - -#if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(ESP32_DIY_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) -#define HAS_SX127X -#endif - -#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) -#define HAS_AXP192 -#endif - -#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262) -#define HAS_AXP2101 -#endif // LORA MODULES #if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(ESP32_DIY_LoRa) @@ -134,6 +119,18 @@ #endif +#ifdef ESP32_C3_DIY_LoRa +#define OLED_SDA 8 +#define OLED_SCL 9 +#define OLED_RST 10 +#define LORA_SCK 4 +#define LORA_MISO 5 +#define LORA_MOSI 6 +#define LORA_CS 7 +#define LORA_RST 3 +#define LORA_IRQ 2 +#endif + /* (Same pins for LILYGO LoRa32 and ESP32 Wroom Dev ) SX1278-------------------> ESP32 ttgo-lora32-v21 and ESP32 WROOM Dev GND GND