variant.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // For OLED LCD
  2. #define I2C_SDA 21
  3. #define I2C_SCL 22
  4. // For GPS, 'undef's not needed
  5. #define GPS_TX_PIN 15
  6. #define GPS_RX_PIN 12
  7. #define PIN_GPS_EN 4
  8. #define GPS_POWER_TOGGLE // Moved definition from platformio.ini to here
  9. #define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
  10. #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
  11. #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
  12. #define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
  13. #define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
  14. #define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
  15. #define LED_PIN 2 // add status LED (compatible with core-pcb and DIY targets)
  16. // Radio
  17. #define USE_SX1262 // E22-900M30S uses SX1262
  18. #define USE_SX1268 // E22-400M30S uses SX1268
  19. #define SX126X_MAX_POWER 22 // Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA)
  20. #define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V
  21. #define SX126X_CS 18 // EBYTE module's NSS pin
  22. #define SX126X_SCK 5 // EBYTE module's SCK pin
  23. #define SX126X_MOSI 27 // EBYTE module's MOSI pin
  24. #define SX126X_MISO 19 // EBYTE module's MISO pin
  25. #define SX126X_RESET 23 // EBYTE module's NRST pin
  26. #define SX126X_BUSY 32 // EBYTE module's BUSY pin
  27. #define SX126X_DIO1 33 // EBYTE module's DIO1 pin
  28. // The E22's TXEN pin is connected to MCU pin, E22's RXEN pin is connected to MCU pin (allows for ramping up PA before transmission
  29. // Don't define DIO2_AS_RF_SWITCH because we only use DIO2 or an MCU pin mutually exclusively to connect to E22's TXEN (to prevent
  30. // a short if they are both connected at the same time and there's a slight non-neglibible delay and/or voltage difference between
  31. // DIO2 and TXEN).
  32. #define SX126X_TXEN 13 // Schematic connects EBYTE module's TXEN pin to MCU
  33. #define SX126X_RXEN 14 // Schematic connects EBYTE module's RXEN pin to MCU
  34. #define LORA_CS SX126X_CS // Compatibility with variant file configuration structure
  35. #define LORA_SCK SX126X_SCK // Compatibility with variant file configuration structure
  36. #define LORA_MOSI SX126X_MOSI // Compatibility with variant file configuration structure
  37. #define LORA_MISO SX126X_MISO // Compatibility with variant file configuration structure
  38. #define LORA_DIO1 SX126X_DIO1 // Compatibility with variant file configuration structure