mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-28 12:42:00 +00:00
Merge branch 'master' into apollo
This commit is contained in:
@@ -22,26 +22,26 @@ extern "C" {
|
||||
/*
|
||||
NRF52 PRO MICRO PIN ASSIGNMENT
|
||||
|
||||
| Pin | Function | | Pin | Function |
|
||||
|-------|------------|---|---------|-------------|
|
||||
| Gnd | | | vbat | |
|
||||
| P0.06 | Serial2 RX | | vbat | |
|
||||
| P0.08 | Serial2 TX | | Gnd | |
|
||||
| Gnd | | | reset | |
|
||||
| Gnd | | | ext_vcc | *see 0.13 |
|
||||
| P0.17 | RXEN | | P0.31 | BATTERY_PIN |
|
||||
| P0.20 | GPS_RX | | P0.29 | BUSY |
|
||||
| P0.22 | GPS_TX | | P0.02 | MISO |
|
||||
| P0.24 | GPS_EN | | P1.15 | MOSI |
|
||||
| P1.00 | BUTTON_PIN | | P1.13 | CS |
|
||||
| P0.11 | SCL | | P1.11 | SCK |
|
||||
| P1.04 | SDA | | P0.10 | DIO1/IRQ |
|
||||
| P1.06 | Free pin | | P0.09 | RESET |
|
||||
| | | | | |
|
||||
| | Mid board | | | Internal |
|
||||
| P1.01 | Free pin | | 0.15 | LED |
|
||||
| P1.02 | Free pin | | 0.13 | 3V3_EN |
|
||||
| P1.07 | Free pin | | | |
|
||||
| Pin | Function | | Pin | Function | RF95 |
|
||||
| ----- | ----------- | --- | -------- | ------------ | ----- |
|
||||
| Gnd | | | vbat | | |
|
||||
| P0.06 | Serial2 RX | | vbat | | |
|
||||
| P0.08 | Serial2 TX | | Gnd | | |
|
||||
| Gnd | | | reset | | |
|
||||
| Gnd | | | ext_vcc | *see 0.13 | |
|
||||
| P0.17 | RXEN | | P0.31 | BATTERY_PIN | |
|
||||
| P0.20 | GPS_RX | | P0.29 | BUSY | DIO0 |
|
||||
| P0.22 | GPS_TX | | P0.02 | MISO | MISO |
|
||||
| P0.24 | GPS_EN | | P1.15 | MOSI | MOSI |
|
||||
| P1.00 | BUTTON_PIN | | P1.13 | CS | CS |
|
||||
| P0.11 | SCL | | P1.11 | SCK | SCK |
|
||||
| P1.04 | SDA | | P0.10 | DIO1/IRQ | DIO1 |
|
||||
| P1.06 | Free pin | | P0.09 | RESET | RST |
|
||||
| | | | | | |
|
||||
| | Mid board | | | Internal | |
|
||||
| P1.01 | Free pin | | 0.15 | LED | |
|
||||
| P1.02 | Free pin | | 0.13 | 3V3_EN | |
|
||||
| P1.07 | Free pin | | | | |
|
||||
*/
|
||||
|
||||
// Number of pins defined in PinDescription array
|
||||
@@ -112,13 +112,28 @@ NRF52 PRO MICRO PIN ASSIGNMENT
|
||||
#define PIN_SPI_MOSI (32 + 15) // P1.15
|
||||
#define PIN_SPI_SCK (32 + 11) // P1.11
|
||||
|
||||
#define LORA_MISO PIN_SPI_MISO
|
||||
#define LORA_MOSI PIN_SPI_MOSI
|
||||
#define LORA_SCK PIN_SPI_SCK
|
||||
#define LORA_CS (32 + 13) // P1.13
|
||||
|
||||
// LORA MODULES
|
||||
#define USE_LLCC68
|
||||
#define USE_SX1262
|
||||
// #define USE_RF95
|
||||
#define USE_RF95
|
||||
#define USE_SX1268
|
||||
|
||||
// LORA CONFIG
|
||||
// RF95 CONFIG
|
||||
|
||||
#define LORA_DIO0 (0 + 29) // P0.10 IRQ
|
||||
#define LORA_DIO1 (0 + 10) // P0.10 IRQ
|
||||
#define LORA_RESET (0 + 9) // P0.09
|
||||
|
||||
// RX/TX for RFM95/SX127x
|
||||
#define RF95_RXEN (0 + 17) // P0.17
|
||||
#define RF95_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected.
|
||||
|
||||
// SX126X CONFIG
|
||||
#define SX126X_CS (32 + 13) // P1.13 FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 (0 + 10) // P0.10 IRQ
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // Note for E22 modules: DIO2 is not attached internally to TXEN for automatic TX/RX switching,
|
||||
@@ -134,18 +149,21 @@ NRF52 PRO MICRO PIN ASSIGNMENT
|
||||
On the SX1262, DIO3 sets the voltage for an external TCXO, if one is present. If one is not present, use TCXO_OPTIONAL to try both
|
||||
settings.
|
||||
|
||||
| Mfr | Module | TCXO | RF Switch | Notes |
|
||||
| ---------- | ---------------- | ---- | --------- | -------------------------------------------- |
|
||||
| Ebyte | E22-900M22S | Yes | Ext | |
|
||||
| Ebyte | E22-900MM22S | No | Ext | |
|
||||
| Ebyte | E22-900M30S | Yes | Ext | |
|
||||
| Ebyte | E22-900M33S | Yes | Ext | MAX_POWER must be set to 8 for this |
|
||||
| Ebyte | E220-900M22S | No | Ext | LLCC68, looks like DIO3 not connected at all |
|
||||
| AI-Thinker | RA-01SH | No | Int | |
|
||||
| Heltec | HT-RA62 | Yes | Int | |
|
||||
| NiceRF | Lora1262 | yes | Int | |
|
||||
| Waveshare | Core1262-HF | yes | Ext | |
|
||||
| Waveshare | LoRa Node Module | yes | Int | |
|
||||
| Mfr | Module | TCXO | RF Switch | Notes |
|
||||
| ------------ | ---------------- | ---- | --------- | ------------------------------------- |
|
||||
| Ebyte | E22-900M22S | Yes | Ext | |
|
||||
| Ebyte | E22-900MM22S | No | Ext | |
|
||||
| Ebyte | E22-900M30S | Yes | Ext | |
|
||||
| Ebyte | E22-900M33S | Yes | Ext | MAX_POWER must be set to 8 for this |
|
||||
| Ebyte | E220-900M22S | No | Ext | LLCC68, looks like DIO3 not connected |
|
||||
| AI-Thinker | RA-01SH | No | Int | SX1262 |
|
||||
| Heltec | HT-RA62 | Yes | Int | |
|
||||
| NiceRF | Lora1262 | yes | Int | |
|
||||
| Waveshare | Core1262-HF | yes | Ext | |
|
||||
| Waveshare | LoRa Node Module | yes | Int | |
|
||||
| Seeed | Wio-SX1262 | yes | Int | Sooooo cute! |
|
||||
| AI-Thinker | RA-02 | No | Int | SX1278 **433mhz band only** |
|
||||
| RF Solutions | RFM95 | No | Int | Untested |
|
||||
|
||||
*/
|
||||
|
||||
|
||||
27
variants/dreamcatcher/platformio.ini
Normal file
27
variants/dreamcatcher/platformio.ini
Normal file
@@ -0,0 +1,27 @@
|
||||
[env:dreamcatcher] ; 2301, latest revision
|
||||
extends = esp32s3_base
|
||||
board = esp32s3box
|
||||
board_level = extra
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-D OTHERNET_DC_REV=2301
|
||||
-I variants/dreamcatcher
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
|
||||
lib_deps = ${esp32s3_base.lib_deps}
|
||||
earlephilhower/ESP8266Audio@^1.9.7
|
||||
earlephilhower/ESP8266SAM@^1.0.1
|
||||
|
||||
[env:dreamcatcher-2206]
|
||||
extends = esp32s3_base
|
||||
board = esp32s3box
|
||||
board_level = extra
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-D OTHERNET_DC_REV=2206
|
||||
-I variants/dreamcatcher
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
17
variants/dreamcatcher/rfswitch.h
Normal file
17
variants/dreamcatcher/rfswitch.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "RadioLib.h"
|
||||
|
||||
// RF Switch Matrix SubG RFO_HP_LF / RFO_LP_LF / RFI_[NP]_LF0
|
||||
// DIO5 -> RFSW0_V1
|
||||
// DIO6 -> RFSW1_V2
|
||||
// DIO7 -> ANT_CTRL_ON + ESP_IO9/LR_GPS_ANT_DC_EN -> RFI_GPS (Bias-T GPS)
|
||||
|
||||
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,
|
||||
RADIOLIB_NC};
|
||||
|
||||
static const Module::RfSwitchMode_t rfswitch_table[] = {
|
||||
// mode DIO5 DIO6 DIO7
|
||||
{LR11x0::MODE_STBY, {LOW, LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW, LOW}},
|
||||
{LR11x0::MODE_TX, {LOW, HIGH, LOW}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW}},
|
||||
{LR11x0::MODE_TX_HF, {LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH}},
|
||||
{LR11x0::MODE_WIFI, {LOW, LOW, LOW}}, END_OF_MODE_TABLE,
|
||||
};
|
||||
109
variants/dreamcatcher/variant.h
Normal file
109
variants/dreamcatcher/variant.h
Normal file
@@ -0,0 +1,109 @@
|
||||
#undef I2C_SDA
|
||||
#undef I2C_SCL
|
||||
#define I2C_SDA 16 // I2C pins for this board
|
||||
#define I2C_SCL 17
|
||||
|
||||
#define I2C_SDA1 45
|
||||
#define I2C_SCL1 46
|
||||
|
||||
#define LED_PIN 6
|
||||
#define LED_STATE_ON 1
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define HAS_TPS65233
|
||||
|
||||
// V1 of SubG Switch SMA 0 or F Selector 1
|
||||
// #define RF_SW_SUBG1 8
|
||||
// V2 of SubG Switch SMA 1 or F Selector 0
|
||||
// #define RF_SW_SUBG2 5
|
||||
|
||||
#define RESET_OLED 8 // Emulate RF_SW_SUBG1, Use F Connector
|
||||
#define VTFT_CTRL 5 // Emulate RF_SW_SUBG2, for SMA swap the pin values
|
||||
|
||||
#if OTHERNET_DC_REV == 2206
|
||||
#define USE_LR1120
|
||||
|
||||
#define SPI_MISO 37
|
||||
#define SPI_MOSI 39
|
||||
#define SPI_SCK 38
|
||||
#define SDCARD_CS 40
|
||||
|
||||
#define PIN_BUZZER 48
|
||||
|
||||
// These can either be used for GPS or a serial link. Define through Protobufs
|
||||
// #define GPS_RX_PIN 10
|
||||
// #define GPS_TX_PIN 21
|
||||
|
||||
#define PIN_POWER_EN 7 // RF section power supply enable
|
||||
#define PERIPHERAL_WARMUP_MS 1000 // wait for TPS chip to initialize
|
||||
#define TPS_EXTM 45 // connected, but not used
|
||||
#define BIAS_T_ENABLE 9 // needs to be low
|
||||
#define BIAS_T_VALUE 0
|
||||
#else // 2301
|
||||
#define USE_LR1121
|
||||
#define SPI_MISO 10
|
||||
#define SPI_MOSI 39
|
||||
#define SPI_SCK 38
|
||||
|
||||
#define SDCARD_CS 40
|
||||
|
||||
// This is only informational, we always use SD cards in 1 bit mode
|
||||
#define SPI_DATA1 15
|
||||
#define SPI_DATA2 18
|
||||
|
||||
// These can either be used for GPS or a serial link. Define through Protobufs
|
||||
// #define GPS_RX_PIN 36
|
||||
// #define GPS_TX_PIN 37
|
||||
|
||||
// dac / amp instead of buzzer
|
||||
#define HAS_I2S
|
||||
#define DAC_I2S_BCK 21
|
||||
#define DAC_I2S_WS 9
|
||||
#define DAC_I2S_DOUT 48
|
||||
|
||||
#define BIAS_T_ENABLE 7 // needs to be low
|
||||
#define BIAS_T_VALUE 0
|
||||
#define BIAS_T_SUBGHZ 2 // also needs to be low, we hijack SENSOR_POWER_CTRL_PIN to emulate this
|
||||
#define SENSOR_POWER_CTRL_PIN BIAS_T_SUBGHZ
|
||||
#define SENSOR_POWER_ON 0
|
||||
#endif
|
||||
|
||||
#define HAS_SDCARD // Have SPI interface SD card slot
|
||||
#define SDCARD_USE_SPI1
|
||||
|
||||
#define LORA_RESET 3
|
||||
#define LORA_SCK 12
|
||||
#define LORA_MISO 13
|
||||
#define LORA_MOSI 11
|
||||
#define LORA_CS 14
|
||||
#define LORA_DIO9 4
|
||||
#define LORA_DIO2 47
|
||||
|
||||
#define LR1120_IRQ_PIN LORA_DIO9
|
||||
#define LR1120_NRESET_PIN LORA_RESET
|
||||
#define LR1120_BUSY_PIN LORA_DIO2
|
||||
#define LR1120_SPI_NSS_PIN LORA_CS
|
||||
#define LR1120_SPI_SCK_PIN LORA_SCK
|
||||
#define LR1120_SPI_MOSI_PIN LORA_MOSI
|
||||
#define LR1120_SPI_MISO_PIN LORA_MISO
|
||||
|
||||
#define LR1121_IRQ_PIN LORA_DIO9
|
||||
#define LR1121_NRESET_PIN LORA_RESET
|
||||
#define LR1121_BUSY_PIN LORA_DIO2
|
||||
#define LR1121_SPI_NSS_PIN LORA_CS
|
||||
#define LR1121_SPI_SCK_PIN LORA_SCK
|
||||
#define LR1121_SPI_MOSI_PIN LORA_MOSI
|
||||
#define LR1121_SPI_MISO_PIN LORA_MISO
|
||||
|
||||
#define LR11X0_DIO3_TCXO_VOLTAGE 1.8
|
||||
#define LR11X0_DIO_AS_RF_SWITCH
|
||||
|
||||
// This board needs external switching between sub-GHz and 2.4G circuits
|
||||
|
||||
// V1 of RF1 selector SubG 1 or 2.4GHz 0
|
||||
// #define RF_SW_SMA1 42
|
||||
// V2 of RF1 Selector SubG 0 or 2.4GHz 1
|
||||
// #define RF_SW_SMA2 41
|
||||
|
||||
#define LR11X0_RF_SWITCH_SUBGHZ 42
|
||||
#define LR11X0_RF_SWITCH_2_4GHZ 41
|
||||
63
variants/m5stack_cores3/pins_arduino.h
Normal file
63
variants/m5stack_cores3/pins_arduino.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// Some boards have too low voltage on this pin (board design bug)
|
||||
// Use different pin with 3V and connect with 48
|
||||
// and change this setup for the chosen pin (for example 38)
|
||||
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48;
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
#define RGB_BUILTIN LED_BUILTIN
|
||||
#define RGB_BRIGHTNESS 64
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t TXD2 = 17;
|
||||
static const uint8_t RXD2 = 18;
|
||||
|
||||
static const uint8_t SDA = 12;
|
||||
static const uint8_t SCL = 11;
|
||||
|
||||
static const uint8_t SS = 15;
|
||||
static const uint8_t MOSI = 37;
|
||||
static const uint8_t MISO = 35;
|
||||
static const uint8_t SCK = 36;
|
||||
|
||||
static const uint8_t G0 = 0;
|
||||
static const uint8_t G1 = 1;
|
||||
static const uint8_t G2 = 2;
|
||||
static const uint8_t G3 = 3;
|
||||
static const uint8_t G4 = 4;
|
||||
static const uint8_t G5 = 5;
|
||||
static const uint8_t G6 = 6;
|
||||
static const uint8_t G7 = 7;
|
||||
static const uint8_t G8 = 8;
|
||||
static const uint8_t G9 = 9;
|
||||
static const uint8_t G11 = 11;
|
||||
static const uint8_t G12 = 12;
|
||||
static const uint8_t G13 = 13;
|
||||
static const uint8_t G14 = 14;
|
||||
static const uint8_t G17 = 17;
|
||||
static const uint8_t G18 = 18;
|
||||
static const uint8_t G19 = 19;
|
||||
static const uint8_t G20 = 20;
|
||||
static const uint8_t G21 = 21;
|
||||
static const uint8_t G33 = 33;
|
||||
static const uint8_t G34 = 34;
|
||||
static const uint8_t G35 = 35;
|
||||
static const uint8_t G36 = 36;
|
||||
static const uint8_t G37 = 37;
|
||||
static const uint8_t G38 = 38;
|
||||
static const uint8_t G45 = 45;
|
||||
static const uint8_t G46 = 46;
|
||||
|
||||
static const uint8_t ADC = 10;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
14
variants/m5stack_cores3/platformio.ini
Normal file
14
variants/m5stack_cores3/platformio.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
; M5stack CoreS3
|
||||
[env:m5stack-cores3]
|
||||
extends = esp32s3_base
|
||||
board = m5stack-cores3
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags = ${esp32_base.build_flags}
|
||||
-DPRIVATE_HW
|
||||
-DM5STACK_CORES3
|
||||
-Ivariants/m5stack_cores3
|
||||
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
22
variants/m5stack_cores3/variant.h
Normal file
22
variants/m5stack_cores3/variant.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#define I2C_SDA 12
|
||||
#define I2C_SCL 11
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
#define LORA_SCK 36
|
||||
#define LORA_MISO 35
|
||||
#define LORA_MOSI 37
|
||||
#define LORA_CS 6 // NSS
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 14 // IRQ
|
||||
#define LORA_RESET 5 // RESET
|
||||
#define LORA_RST 5 // RESET
|
||||
#define LORA_IRQ 14 // DIO0
|
||||
#define LORA_DIO1 RADIOLIB_NC // Not really used
|
||||
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
||||
|
||||
#define HAS_AXP2101
|
||||
@@ -54,7 +54,7 @@
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_BUSY
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL
|
||||
#define SX126X_RXEN LORA_DIO4 // Antenna switch !CTRL via GPIO17
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL
|
||||
#define SX126X_POWER_EN LORA_DIO4 // Antenna switch !CTRL via GPIO17
|
||||
// #define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user