Merge pull request #1878 from code8buster/master

Making meshtastic-dr-dev E22-900M22S/M30S work alternately
This commit is contained in:
Thomas Göttgens 2022-11-02 10:34:08 +01:00 committed by GitHub
commit a9c6d6a80c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 31 deletions

View File

@ -10,7 +10,7 @@ namespace graphics
class Screen
{
public:
Screen(char){}
explicit Screen(char){}
void onPress() {}
void setup() {}
void setOn(bool) {}

View File

@ -1,47 +1,55 @@
// For OLED LCD
#define I2C_SDA 21
#define I2C_SCL 22
// Initialize i2c bus on sd_dat and esp_led pins, respectively. We need a bus to not hang on boot
#define HAS_SCREEN 0
#define I2C_SDA 4
#define I2C_SCL 5
// GPS
#undef GPS_RX_PIN
#define GPS_RX_PIN NOT_A_PIN
#undef WANT_GPS
#define HAS_GPS 0
#define BUTTON_PIN 2 // The middle button GPIO on the T-Beam
#define BUTTON_PIN 13 // The middle button GPIO on the T-Beam
#define BUTTON_NEED_PULLUP
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
#define LORA_DIO0 -1 // a No connect on the SX1262/SX1268 module
#define LORA_RESET -1 // RST for SX1276, and for SX1262/SX1268
#define LORA_DIO1 27 // IRQ for SX1262/SX1268 (IO26 FOR 22S)
#define LORA_DIO2 NOT_A_PIN // BUSY for SX1262/SX1268
#define LORA_DIO3 // Not connected on PCB, but internally on the SX1262/SX1268, if DIO3 is high the TXCO is enabled
#define LORA_DIO0 NOT_A_PIN // a No connect on the SX1262/SX1268 module
#define LORA_RESET NOT_A_PIN // RST for SX1276, and for SX1262/SX1268
#define LORA_DIO3 NOT_A_PIN // Not connected on PCB, but internally on the SX1262/SX1268, if DIO3 is high the TXCO is enabled
// In transmitting, set TXEN as high communication levelRXEN pin is low level;
// In receiving, set RXEN as high communication level, TXEN is lowlevel;
// Before powering off, set TXEN、RXEN as low level.
#define LORA_RXEN 17 // Input - RF switch RX control, connecting external MCU IO, valid in high level
#define LORA_TXEN -1 // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level
/* --PINS FOR THE 900M22S
#undef RF95_SCK
#define RF95_SCK 18
#undef RF95_MISO
#define RF95_MISO 19
#undef RF95_MOSI
#define RF95_MOSI 23
// PINS FOR THE 900M22S
#define LORA_DIO1 26 // IRQ for SX1262/SX1268
#define LORA_DIO2 22 // BUSY for SX1262/SX1268
#define LORA_TXEN NOT_A_PIN // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level
#define LORA_RXEN 17 // Input - RF switch RX control, connecting external MCU IO, valid in high level
#undef RF95_NSS
#define RF95_NSS 16
*/
#define SX126X_BUSY 22
#define SX126X_CS 16
// PINS FOR THE 900M30S
#undef RF95_SCK
#define RF95_SCK 18
#undef RF95_MISO
#define RF95_MISO 19
#undef RF95_MOSI
#define RF95_MOSI 23
/*
#define LORA_DIO1 27 // IRQ for SX1262/SX1268
#define LORA_DIO2 35 // BUSY for SX1262/SX1268
#define LORA_TXEN NOT_A_PIN // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level
#define LORA_RXEN 21 // Input - RF switch RX control, connecting external MCU IO, valid in high level
#undef RF95_NSS
#define RF95_NSS 33
#define SX126X_BUSY 35
#define SX126X_CS 33
*/
// RX/TX for RFM95/SX127x
#define RF95_RXEN LORA_RXEN
@ -49,21 +57,15 @@
// #define RF95_TCXO <GPIO#>
// common pinouts for SX126X modules
#define SX126X_CS 33
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY 35
#define SX126X_RESET LORA_RESET
#define SX126X_RXEN LORA_RXEN
#define SX126X_TXEN LORA_TXEN
// supported modules list
#define USE_RF95 // RFM95/SX127x
//#define USE_RF95 // RFM95/SX127x
#define USE_SX1262
#define USE_SX1268
#define USE_LLCC68
#ifdef EBYTE_E22
// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch
// (which is the default for the sx1262interface code)
//#define USE_SX1268
//#define USE_LLCC68
#define SX126X_E22
#endif