2023-07-14 21:12:30 +00:00
|
|
|
#define LED_PIN 18
|
2024-07-06 17:41:29 +00:00
|
|
|
#define BUTTON_PIN 0
|
2023-07-14 21:12:30 +00:00
|
|
|
|
2024-07-06 17:41:29 +00:00
|
|
|
// I2C
|
2023-08-07 23:22:17 +00:00
|
|
|
#define I2C_SDA SDA
|
|
|
|
#define I2C_SCL SCL
|
|
|
|
|
2024-07-06 17:41:29 +00:00
|
|
|
// Display (E-Ink)
|
2023-07-14 21:12:30 +00:00
|
|
|
#define USE_EINK
|
|
|
|
#define PIN_EINK_CS 4
|
|
|
|
#define PIN_EINK_BUSY 7
|
|
|
|
#define PIN_EINK_DC 5
|
|
|
|
#define PIN_EINK_RES 6
|
|
|
|
#define PIN_EINK_SCLK 3
|
|
|
|
#define PIN_EINK_MOSI 2
|
|
|
|
|
2024-07-06 17:41:29 +00:00
|
|
|
// SPI
|
2024-01-10 01:48:21 +00:00
|
|
|
#define SPI_INTERFACES_COUNT 2
|
2024-08-02 02:03:59 +00:00
|
|
|
#define PIN_SPI_MISO 11
|
|
|
|
#define PIN_SPI_MOSI 10
|
|
|
|
#define PIN_SPI_SCK 9
|
2024-01-10 01:48:21 +00:00
|
|
|
|
2024-07-06 17:41:29 +00:00
|
|
|
// Power
|
|
|
|
#define VEXT_ENABLE 45 // Active low, powers the E-Ink display
|
2024-02-13 16:20:48 +00:00
|
|
|
#define ADC_CTRL 19
|
|
|
|
#define BATTERY_PIN 20
|
|
|
|
#define ADC_CHANNEL ADC2_GPIO20_CHANNEL
|
|
|
|
#define ADC_MULTIPLIER 2 // Voltage divider is roughly 1:1
|
|
|
|
#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2
|
2024-07-06 17:41:29 +00:00
|
|
|
#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high
|
2024-08-02 02:03:59 +00:00
|
|
|
#define HAS_32768HZ
|
2024-08-21 23:53:12 +00:00
|
|
|
#define ADC_CTRL_ENABLED LOW
|
2023-07-14 21:12:30 +00:00
|
|
|
|
2024-07-06 17:41:29 +00:00
|
|
|
// LoRa
|
2023-07-14 21:12:30 +00:00
|
|
|
#define USE_SX1262
|
|
|
|
|
2024-08-02 02:03:59 +00:00
|
|
|
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module
|
2023-07-14 21:12:30 +00:00
|
|
|
#define LORA_RESET 12
|
|
|
|
#define LORA_DIO1 14 // SX1262 IRQ
|
|
|
|
#define LORA_DIO2 13 // SX1262 BUSY
|
|
|
|
|
2023-11-29 21:51:05 +00:00
|
|
|
#define LORA_SCK 9
|
|
|
|
#define LORA_MISO 11
|
|
|
|
#define LORA_MOSI 10
|
|
|
|
#define LORA_CS 8
|
2023-07-14 21:12:30 +00:00
|
|
|
|
2023-11-29 21:51:05 +00:00
|
|
|
#define SX126X_CS LORA_CS
|
2023-07-14 21:12:30 +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-21 23:53:12 +00:00
|
|
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|