From 214feb1f21a9fd7ec45b14908ad04d96528521ee Mon Sep 17 00:00:00 2001 From: "A. Rager" Date: Wed, 1 Mar 2023 06:36:25 -0800 Subject: [PATCH] Add Hardware: BetaFPV 900 Nano TX (#2249) Co-authored-by: Ben Meadors --- src/platform/esp32/architecture.h | 2 ++ variants/betafpv_900_tx_nano/platformio.ini | 16 ++++++++++++ variants/betafpv_900_tx_nano/variant.h | 28 +++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 variants/betafpv_900_tx_nano/platformio.ini create mode 100644 variants/betafpv_900_tx_nano/variant.h diff --git a/src/platform/esp32/architecture.h b/src/platform/esp32/architecture.h index edd16ebbd..45ee7e6d4 100644 --- a/src/platform/esp32/architecture.h +++ b/src/platform/esp32/architecture.h @@ -97,6 +97,8 @@ #define HW_VENDOR meshtastic_HardwareModel_BETAFPV_2400_TX #elif defined(NANO_G1_EXPLORER) #define HW_VENDOR meshtastic_HardwareModel_NANO_G1_EXPLORER +#elif defined(BETAFPV_900_TX_NANO) +#define HW_VENDOR meshtastic_HardwareModel_BETAFPV_900_NANO_TX #endif // diff --git a/variants/betafpv_900_tx_nano/platformio.ini b/variants/betafpv_900_tx_nano/platformio.ini new file mode 100644 index 000000000..e4c945cab --- /dev/null +++ b/variants/betafpv_900_tx_nano/platformio.ini @@ -0,0 +1,16 @@ +[env:betafpv_900_tx_nano] +extends = esp32_base +board = esp32doit-devkit-v1 +build_flags = + ${esp32_base.build_flags} + -D BETAFPV_900_TX_NANO + -D VTABLES_IN_FLASH=1 + -D CONFIG_DISABLE_HAL_LOCKS=1 + -O2 + -I variants/betafpv_900_tx_nano +board_build.f_cpu = 240000000L +upload_protocol = esptool +upload_port = /dev/ttyUSB0 +upload_speed = 460800 +lib_deps = + ${esp32_base.lib_deps} diff --git a/variants/betafpv_900_tx_nano/variant.h b/variants/betafpv_900_tx_nano/variant.h new file mode 100644 index 000000000..01961d92d --- /dev/null +++ b/variants/betafpv_900_tx_nano/variant.h @@ -0,0 +1,28 @@ +// https://betafpv.com/products/elrs-nano-tx-module + +// no screen +#define HAS_SCREEN 0 + +// NO GPS +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +#define USE_RF95 + +#define RF95_SCK 18 +#define RF95_MISO 19 +#define RF95_MOSI 23 +#define RF95_NSS 5 + +#define LORA_DIO0 4 +#define LORA_RESET 14 +#define LORA_DIO1 2 +#define LORA_DIO2 +#define LORA_DIO3 + +#define LED_PIN 16 // green - blue is at 17 + +#define BUTTON_PIN 25 +#define BUTTON_NEED_PULLUP + +#undef EXT_NOTIFY_OUT