mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-01 18:29:56 +00:00
1a38c4e51d
While working on #4378 I noticed a funny problem: the blinking system LED was on during deep-sleep. Initially I thought it was some weird sleep hw config thing but it turns out it was easier but more pervasive. We had two different preprocessor symbols which both meant approximately the same thing LED_INVERTED and LED_STATE_ON (though their polarity was opposite). Some variant files were setting one, others were setting the other, and others were setting both. heh. In the case of the board I was testing (seeed tracker wio 1100) it was only setting one and the default behavior for the other (for all boards) was incorrect. So I did a grep and it seems like LED_STATE_ON was used more often, so I kept that one and removed LED_INVERTED everywhere.
45 lines
1.7 KiB
C
45 lines
1.7 KiB
C
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
|
|
|
#define I2C_SDA 21
|
|
#define I2C_SCL 22
|
|
|
|
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
|
// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented
|
|
// anywhere.
|
|
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
|
|
|
#define LED_STATE_ON 0 // State when LED is lit
|
|
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
|
|
|
|
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
|
// not found then probe for SX1262
|
|
#define USE_RF95 // RFM95/SX127x
|
|
#define USE_SX1262
|
|
#define USE_SX1268
|
|
|
|
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
#define LORA_RESET 23
|
|
#define LORA_DIO1 33 // SX1262 IRQ
|
|
#define LORA_DIO2 32 // SX1262 BUSY
|
|
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
|
|
|
#ifdef USE_SX1262
|
|
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
|
#define SX126X_DIO1 LORA_DIO1
|
|
#define SX126X_BUSY LORA_DIO2
|
|
#define SX126X_RESET LORA_RESET
|
|
// Not really an E22 but TTGO seems to be trying to clone that
|
|
#define SX126X_DIO2_AS_RF_SWITCH
|
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
|
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
|
// code)
|
|
#endif
|
|
|
|
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
|
// and waking from light sleep
|
|
// #define PMU_IRQ 35
|
|
#define HAS_AXP192
|
|
#define GPS_UBLOX
|
|
#define GPS_RX_PIN 34
|
|
#define GPS_TX_PIN 12
|
|
// #define GPS_DEBUG
|