CrowPanel Advanced V2 support

This commit is contained in:
Manuel
2025-09-18 16:00:49 +02:00
parent 188283b382
commit b1821bfd4f
4 changed files with 28 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ lib_deps =
[device-ui_base]
lib_deps =
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
https://github.com/meshtastic/device-ui/archive/9ed5355a24059750e9b2eb5d669574d9ea42a37b.zip
https://github.com/meshtastic/device-ui/archive/9603b1d37fd8b22ddd5a6ea9352d3bd26020b999.zip
; Common libs for environmental measurements in telemetry module
[environmental_base]

View File

@@ -128,3 +128,6 @@ build_flags =
${crowpanel_large_esp32s3_base.build_flags}
-D VIEW_320x240
-D DISPLAY_SIZE=800x480 ; landscape mode
build_src_filter =
${esp32s3_base.build_src_filter}
+<../variants/esp32s3/elecrow_panel>

View File

@@ -0,0 +1,21 @@
// meshtastic/firmware/variants/elecrow_panel/variant.cpp
#include "variant.h"
#include "Arduino.h"
#include "Wire.h"
bool elecrow_v2 = false; // false = v1, true = v2
extern "C" {
void initVariant()
{
Wire.begin(I2C_SDA, I2C_SCL, 100000);
delay(50);
Wire.beginTransmission(0x30);
if (Wire.endTransmission() == 0) {
elecrow_v2 = true;
}
Wire.end();
}
}

View File

@@ -1,6 +1,8 @@
#define I2C_SDA 15
#define I2C_SCL 16
extern bool elecrow_v2; // false = v1, true = v2
#if CROW_SELECT == 1
#define WAKE_ON_TOUCH
#define SCREEN_TOUCH_INT 47
@@ -72,7 +74,7 @@
#define SENSOR_POWER_ON LOW
#else
// 4.3", 5.0", 7.0"
#define LORA_CS 0
#define LORA_CS (elecrow_v2 ? 8 : 0)
#define LORA_SCK 5
#define LORA_MISO 4
#define LORA_MOSI 6