mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
CrowPanel Advanced V2 support
This commit is contained in:
@@ -118,7 +118,7 @@ lib_deps =
|
|||||||
[device-ui_base]
|
[device-ui_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
# 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
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
|
|||||||
@@ -128,3 +128,6 @@ build_flags =
|
|||||||
${crowpanel_large_esp32s3_base.build_flags}
|
${crowpanel_large_esp32s3_base.build_flags}
|
||||||
-D VIEW_320x240
|
-D VIEW_320x240
|
||||||
-D DISPLAY_SIZE=800x480 ; landscape mode
|
-D DISPLAY_SIZE=800x480 ; landscape mode
|
||||||
|
build_src_filter =
|
||||||
|
${esp32s3_base.build_src_filter}
|
||||||
|
+<../variants/esp32s3/elecrow_panel>
|
||||||
|
|||||||
21
variants/esp32s3/elecrow_panel/variant.cpp
Normal file
21
variants/esp32s3/elecrow_panel/variant.cpp
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#define I2C_SDA 15
|
#define I2C_SDA 15
|
||||||
#define I2C_SCL 16
|
#define I2C_SCL 16
|
||||||
|
|
||||||
|
extern bool elecrow_v2; // false = v1, true = v2
|
||||||
|
|
||||||
#if CROW_SELECT == 1
|
#if CROW_SELECT == 1
|
||||||
#define WAKE_ON_TOUCH
|
#define WAKE_ON_TOUCH
|
||||||
#define SCREEN_TOUCH_INT 47
|
#define SCREEN_TOUCH_INT 47
|
||||||
@@ -72,7 +74,7 @@
|
|||||||
#define SENSOR_POWER_ON LOW
|
#define SENSOR_POWER_ON LOW
|
||||||
#else
|
#else
|
||||||
// 4.3", 5.0", 7.0"
|
// 4.3", 5.0", 7.0"
|
||||||
#define LORA_CS 0
|
#define LORA_CS (elecrow_v2 ? 8 : 0)
|
||||||
#define LORA_SCK 5
|
#define LORA_SCK 5
|
||||||
#define LORA_MISO 4
|
#define LORA_MISO 4
|
||||||
#define LORA_MOSI 6
|
#define LORA_MOSI 6
|
||||||
|
|||||||
Reference in New Issue
Block a user