2023-08-07 23:22:17 +00:00
|
|
|
#define I2C_SCL SCL
|
|
|
|
#define I2C_SDA SDA
|
2023-05-10 00:30:43 +00:00
|
|
|
|
2022-11-13 19:28:02 +00:00
|
|
|
#define LED_PIN LED
|
|
|
|
|
|
|
|
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
2024-08-22 18:07:06 +00:00
|
|
|
#define VEXT_ON_VALUE LOW
|
2022-11-13 19:28:02 +00:00
|
|
|
#define BUTTON_PIN 0
|
|
|
|
|
2024-02-16 12:09:57 +00:00
|
|
|
#define ADC_CTRL 37
|
|
|
|
#define ADC_CTRL_ENABLED LOW
|
2022-11-13 19:28:02 +00:00
|
|
|
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
2023-05-16 05:40:42 +00:00
|
|
|
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
2023-05-26 11:16:40 +00:00
|
|
|
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
2024-05-31 16:18:06 +00:00
|
|
|
#define ADC_MULTIPLIER 4.9 * 1.045
|
2022-11-13 19:28:02 +00:00
|
|
|
|
|
|
|
#define USE_SX1262
|
|
|
|
|
2023-01-21 13:34:29 +00:00
|
|
|
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
|
|
|
#define LORA_RESET 12
|
|
|
|
#define LORA_DIO1 14 // SX1262 IRQ
|
|
|
|
#define LORA_DIO2 13 // SX1262 BUSY
|
|
|
|
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
2022-11-13 19:28:02 +00:00
|
|
|
|
2023-11-29 21:51:05 +00:00
|
|
|
#define LORA_SCK 9
|
|
|
|
#define LORA_MISO 11
|
|
|
|
#define LORA_MOSI 10
|
|
|
|
#define LORA_CS 8
|
2022-11-13 19:28:02 +00:00
|
|
|
|
2023-11-29 21:51:05 +00:00
|
|
|
#define SX126X_CS LORA_CS
|
2023-01-21 13:34:29 +00:00
|
|
|
#define SX126X_DIO1 LORA_DIO1
|
|
|
|
#define SX126X_BUSY LORA_DIO2
|
|
|
|
#define SX126X_RESET LORA_RESET
|
2023-09-27 21:01:40 +00:00
|
|
|
|
|
|
|
#define SX126X_DIO2_AS_RF_SWITCH
|
2024-08-22 18:07:06 +00:00
|
|
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|