mirror of
https://github.com/pelgraine/Meck.git
synced 2026-03-28 17:42:44 +01:00
wio-l1-eink initial support
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
"speed": 115200,
|
"speed": 115200,
|
||||||
"protocols": [
|
"protocols": [
|
||||||
"jlink",
|
"jlink",
|
||||||
|
"stlink",
|
||||||
"nrfjprog",
|
"nrfjprog",
|
||||||
"nrfutil",
|
"nrfutil",
|
||||||
"cmsis-dap",
|
"cmsis-dap",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
class GxEPDDisplay : public DisplayDriver {
|
class GxEPDDisplay : public DisplayDriver {
|
||||||
|
|
||||||
#if defined(HELTEC_MESH_POCKET)
|
#if defined(EINK_DISPLAY_MODEL)
|
||||||
GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT> display;
|
GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT> display;
|
||||||
const float scale_x = EINK_SCALE_X;
|
const float scale_x = EINK_SCALE_X;
|
||||||
const float scale_y = EINK_SCALE_Y;
|
const float scale_y = EINK_SCALE_Y;
|
||||||
@@ -45,7 +45,7 @@ class GxEPDDisplay : public DisplayDriver {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// there is a margin in y...
|
// there is a margin in y...
|
||||||
#if defined(HELTEC_MESH_POCKET)
|
#if defined(EINK_DISPLAY_MODEL)
|
||||||
GxEPDDisplay() : DisplayDriver(128, 128), display(EINK_DISPLAY_MODEL(PIN_DISPLAY_CS, PIN_DISPLAY_DC, PIN_DISPLAY_RST, PIN_DISPLAY_BUSY)) {}
|
GxEPDDisplay() : DisplayDriver(128, 128), display(EINK_DISPLAY_MODEL(PIN_DISPLAY_CS, PIN_DISPLAY_DC, PIN_DISPLAY_RST, PIN_DISPLAY_BUSY)) {}
|
||||||
#else
|
#else
|
||||||
GxEPDDisplay() : DisplayDriver(128, 128), display(GxEPD2_150_BN(DISP_CS, DISP_DC, DISP_RST, DISP_BUSY)) {}
|
GxEPDDisplay() : DisplayDriver(128, 128), display(GxEPD2_150_BN(DISP_CS, DISP_DC, DISP_RST, DISP_BUSY)) {}
|
||||||
|
|||||||
66
variants/wio-tracker-l1-eink/platformio.ini
Normal file
66
variants/wio-tracker-l1-eink/platformio.ini
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
[WioTrackerL1Eink]
|
||||||
|
extends = nrf52_base
|
||||||
|
board = seeed-wio-tracker-l1
|
||||||
|
board_build.ldscript = boards/nrf52840_s140_v7.ld
|
||||||
|
build_flags = ${nrf52_base.build_flags}
|
||||||
|
-I lib/nrf52/s140_nrf52_7.3.0_API/include
|
||||||
|
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
|
||||||
|
-I variants/wio-tracker-l1
|
||||||
|
-D WIO_TRACKER_L1
|
||||||
|
-D WIO_TRACKER_L1_EINK
|
||||||
|
-D RADIO_CLASS=CustomSX1262
|
||||||
|
-D WRAPPER_CLASS=CustomSX1262Wrapper
|
||||||
|
-D LORA_TX_POWER=22
|
||||||
|
-D SX126X_CURRENT_LIMIT=140
|
||||||
|
-D SX126X_RX_BOOSTED_GAIN=1
|
||||||
|
-D PIN_OLED_RESET=-1
|
||||||
|
-D EINK_DISPLAY_MODEL=GxEPD2_213_B74
|
||||||
|
-D EINK_SCALE_X=1.953125f
|
||||||
|
-D EINK_SCALE_Y=1.28f
|
||||||
|
-D EINK_X_OFFSET=0
|
||||||
|
-D EINK_Y_OFFSET=10
|
||||||
|
-D DISPLAY_ROTATION=1
|
||||||
|
-D DISABLE_DIAGNOSTIC_OUTPUT
|
||||||
|
-D AUTO_OFF_MILLIS=0
|
||||||
|
build_src_filter = ${nrf52_base.build_src_filter}
|
||||||
|
+<WioTrackerL1Board.cpp>
|
||||||
|
+<../variants/wio-tracker-l1>
|
||||||
|
+<helpers/ui/GxEPDDisplay.cpp>
|
||||||
|
+<helpers/sensors>
|
||||||
|
lib_deps= ${nrf52_base.lib_deps}
|
||||||
|
adafruit/Adafruit SH110X @ ^2.1.13
|
||||||
|
adafruit/Adafruit GFX Library @ ^1.12.1
|
||||||
|
stevemarple/MicroNMEA @ ^2.0.6
|
||||||
|
zinggjm/GxEPD2 @ 1.6.2
|
||||||
|
bakercp/CRC32 @ ^2.0.0
|
||||||
|
adafruit/Adafruit BME280 Library @ ^2.3.0
|
||||||
|
|
||||||
|
[env:WioTrackerL1Eink_companion_radio_ble]
|
||||||
|
extends = WioTrackerL1Eink
|
||||||
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
||||||
|
board_upload.maximum_size = 708608
|
||||||
|
build_flags = ${WioTrackerL1Eink.build_flags}
|
||||||
|
-I examples/companion_radio/ui-new
|
||||||
|
-D MAX_CONTACTS=350
|
||||||
|
-D MAX_GROUP_CHANNELS=40
|
||||||
|
-D BLE_PIN_CODE=123456
|
||||||
|
-D BLE_DEBUG_LOGGING=1
|
||||||
|
-D OFFLINE_QUEUE_SIZE=256
|
||||||
|
-D DISPLAY_CLASS=GxEPDDisplay
|
||||||
|
-D PIN_BUZZER=12
|
||||||
|
-D QSPIFLASH=1
|
||||||
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
; -D MESH_DEBUG=1
|
||||||
|
-D UI_RECENT_LIST_SIZE=9
|
||||||
|
-D UI_SENSORS_PAGE=1
|
||||||
|
build_src_filter = ${WioTrackerL1Eink.build_src_filter}
|
||||||
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<helpers/ui/buzzer.cpp>
|
||||||
|
+<../examples/companion_radio/*.cpp>
|
||||||
|
+<../examples/companion_radio/ui-new/*.cpp>
|
||||||
|
lib_deps = ${WioTrackerL1Eink.lib_deps}
|
||||||
|
adafruit/RTClib @ ^2.1.3
|
||||||
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
end2endzone/NonBlockingRTTTL@^1.3.0
|
||||||
|
debug_tool=stlink
|
||||||
@@ -8,7 +8,11 @@
|
|||||||
#include <helpers/AutoDiscoverRTCClock.h>
|
#include <helpers/AutoDiscoverRTCClock.h>
|
||||||
#include <helpers/ArduinoHelpers.h>
|
#include <helpers/ArduinoHelpers.h>
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SH1106Display.h>
|
#if defined(WIO_TRACKER_L1_EINK)
|
||||||
|
#include <helpers/ui/GxEPDDisplay.h>
|
||||||
|
#else
|
||||||
|
#include <helpers/ui/SH1106Display.h>
|
||||||
|
#endif
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
#endif
|
#endif
|
||||||
#include <helpers/sensors/EnvironmentSensorManager.h>
|
#include <helpers/sensors/EnvironmentSensorManager.h>
|
||||||
|
|||||||
@@ -52,6 +52,15 @@ const uint32_t g_ADigitalPinMap[] = {
|
|||||||
|
|
||||||
// VBAT ENABLE
|
// VBAT ENABLE
|
||||||
4, // D30 BAT_CTL
|
4, // D30 BAT_CTL
|
||||||
|
|
||||||
|
// EINK
|
||||||
|
13, // 31 SCK
|
||||||
|
14, // 32 RST
|
||||||
|
15, // 33 MOSI
|
||||||
|
16, // 34 DC
|
||||||
|
17, // 35 BUSY
|
||||||
|
19, // 36 CS
|
||||||
|
0xFF, // 37 MISO
|
||||||
};
|
};
|
||||||
|
|
||||||
void initVariant() {
|
void initVariant() {
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
#include "WVariant.h"
|
#include "WVariant.h"
|
||||||
|
|
||||||
#define PINS_COUNT (33)
|
#define PINS_COUNT (38)
|
||||||
#define NUM_DIGITAL_PINS (33)
|
#define NUM_DIGITAL_PINS (38)
|
||||||
#define NUM_ANALOG_INPUTS (8)
|
#define NUM_ANALOG_INPUTS (8)
|
||||||
#define NUM_ANALOG_OUTPUTS (0)
|
#define NUM_ANALOG_OUTPUTS (0)
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
#define PIN_SERIAL1_TX (6)
|
#define PIN_SERIAL1_TX (6)
|
||||||
|
|
||||||
// SPI Interfaces
|
// SPI Interfaces
|
||||||
#define SPI_INTERFACES_COUNT (1)
|
#define SPI_INTERFACES_COUNT (2)
|
||||||
|
|
||||||
#define PIN_SPI_MISO (9)
|
#define PIN_SPI_MISO (9)
|
||||||
#define PIN_SPI_MOSI (10)
|
#define PIN_SPI_MOSI (10)
|
||||||
@@ -101,4 +101,19 @@
|
|||||||
#define EXTERNAL_FLASH_DEVICES P25Q16H
|
#define EXTERNAL_FLASH_DEVICES P25Q16H
|
||||||
#define EXTERNAL_FLASH_USE_QSPI
|
#define EXTERNAL_FLASH_USE_QSPI
|
||||||
|
|
||||||
|
// EInk on SPI1
|
||||||
|
#define PIN_DISPLAY_CS (36)
|
||||||
|
#define PIN_DISPLAY_BUSY (35)
|
||||||
|
#define PIN_DISPLAY_DC (34)
|
||||||
|
#define PIN_DISPLAY_RST (32)
|
||||||
|
|
||||||
|
#define PIN_SPI1_MISO (37)
|
||||||
|
#define PIN_SPI1_MOSI (33)
|
||||||
|
#define PIN_SPI1_SCK (31)
|
||||||
|
|
||||||
|
// GxEPD2 needs that for a panel that is not even used !
|
||||||
|
extern const int MISO;
|
||||||
|
extern const int MOSI;
|
||||||
|
extern const int SCK;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user