mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-17 15:27:29 +00:00
Compare commits
5 Commits
jp-bennett
...
mini-epape
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89729496e8 | ||
|
|
33dc1ea3ec | ||
|
|
282121311b | ||
|
|
f4771ddbf6 | ||
|
|
afbd9e2180 |
40
boards/mini-epaper-s3.json
Normal file
40
boards/mini-epaper-s3.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"ldscript": "esp32s3_out.ld",
|
||||||
|
"partitions": "default.csv"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DBOARD_HAS_PSRAM",
|
||||||
|
"-DARDUINO_ESP32S3_DEV",
|
||||||
|
"-DARDUINO_USB_MODE=1",
|
||||||
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "qio",
|
||||||
|
"hwids": [["0x303A", "0x1001"]],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "esp32s3"
|
||||||
|
},
|
||||||
|
"connectivity": ["wifi"],
|
||||||
|
"debug": {
|
||||||
|
"default_tool": "esp-builtin",
|
||||||
|
"onboard_tools": ["esp-builtin"],
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino", "espidf"],
|
||||||
|
"name": "LilyGo Mini-Epapaer-S3 (4 MB Flash, 2MB PSRAM)",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "4MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 4194304,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 460800
|
||||||
|
},
|
||||||
|
"url": "https://www.lilygo.cc",
|
||||||
|
"vendor": "LilyGo"
|
||||||
|
}
|
||||||
@@ -259,6 +259,18 @@ bool EInkDisplay::connect()
|
|||||||
adafruitDisplay->setRotation(3);
|
adafruitDisplay->setRotation(3);
|
||||||
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
||||||
}
|
}
|
||||||
|
#elif defined(MINI_EPAPER_S3)
|
||||||
|
spi1 = new SPIClass(HSPI);
|
||||||
|
spi1->begin(PIN_SPI1_SCK, PIN_SPI1_MISO, PIN_SPI1_MOSI, PIN_EINK_CS);
|
||||||
|
|
||||||
|
// Create GxEPD2 objects
|
||||||
|
auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);
|
||||||
|
adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);
|
||||||
|
|
||||||
|
// Init GxEPD2
|
||||||
|
adafruitDisplay->init();
|
||||||
|
adafruitDisplay->setRotation(0);
|
||||||
|
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
||||||
#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)
|
#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)
|
||||||
|
|
||||||
// Detect display model, before starting SPI
|
// Detect display model, before starting SPI
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ class EInkDisplay : public OLEDDisplay
|
|||||||
SPIClass *hspi = NULL;
|
SPIClass *hspi = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK)
|
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) || \
|
||||||
|
defined(MINI_EPAPER_S3)
|
||||||
SPIClass *spi1 = NULL;
|
SPIClass *spi1 = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,10 @@ int StatusLEDModule::handleStatusUpdate(const meshtastic::Status *arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case meshtastic::BluetoothStatus::ConnectionState::CONNECTED: {
|
case meshtastic::BluetoothStatus::ConnectionState::CONNECTED: {
|
||||||
ble_state = connected;
|
if (ble_state != connected) {
|
||||||
PAIRING_LED_starttime = millis();
|
ble_state = connected;
|
||||||
break;
|
PAIRING_LED_starttime = millis();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
variants/esp32s3/mini-epaper-s3/pins_arduino.h
Normal file
26
variants/esp32s3/mini-epaper-s3/pins_arduino.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef Pins_Arduino_h
|
||||||
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define USB_VID 0x303a
|
||||||
|
#define USB_PID 0x1001
|
||||||
|
|
||||||
|
// The default Wire will be mapped to PMU and RTC
|
||||||
|
static const uint8_t SDA = 18;
|
||||||
|
static const uint8_t SCL = 9;
|
||||||
|
|
||||||
|
// Default SPI will be mapped to Radio
|
||||||
|
static const uint8_t SS = -1;
|
||||||
|
static const uint8_t MOSI = 17;
|
||||||
|
static const uint8_t MISO = 6;
|
||||||
|
static const uint8_t SCK = 8;
|
||||||
|
|
||||||
|
#define SPI_MOSI (39)
|
||||||
|
#define SPI_SCK (41)
|
||||||
|
#define SPI_MISO (38)
|
||||||
|
#define SPI_CS (40)
|
||||||
|
|
||||||
|
#define SDCARD_CS SPI_CS
|
||||||
|
|
||||||
|
#endif /* Pins_Arduino_h */
|
||||||
41
variants/esp32s3/mini-epaper-s3/platformio.ini
Normal file
41
variants/esp32s3/mini-epaper-s3/platformio.ini
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
[env:mini-epaper-s3]
|
||||||
|
;custom_meshtastic_hw_model =
|
||||||
|
custom_meshtastic_hw_model_slug = MINI_EPAPER_S3
|
||||||
|
custom_meshtastic_architecture = esp32-s3
|
||||||
|
custom_meshtastic_actively_supported = true
|
||||||
|
custom_meshtastic_support_level = 1
|
||||||
|
custom_meshtastic_display_name = LILYGO Mini ePaper S3 E-Ink
|
||||||
|
custom_meshtastic_images = mini-epaper-s3.svg
|
||||||
|
custom_meshtastic_tags = LilyGo
|
||||||
|
custom_meshtastic_requires_dfu = no
|
||||||
|
|
||||||
|
extends = esp32s3_base
|
||||||
|
board = mini-epaper-s3
|
||||||
|
board_check = true
|
||||||
|
upload_protocol = esptool
|
||||||
|
|
||||||
|
build_flags =
|
||||||
|
${esp32s3_base.build_flags}
|
||||||
|
-I variants/esp32s3/mini-epaper-s3
|
||||||
|
-DMINI_EPAPER_S3
|
||||||
|
-DPRIVATE_HW ; TODO
|
||||||
|
-DUSE_EINK
|
||||||
|
-DEINK_DISPLAY_MODEL=GxEPD2_102
|
||||||
|
-DEINK_WIDTH=80
|
||||||
|
-DEINK_HEIGHT=128
|
||||||
|
; -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||||
|
; -DEINK_LIMIT_FASTREFRESH=0 ; How many consecutive fast-refreshes are permitted //20
|
||||||
|
; -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates //30
|
||||||
|
; -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
||||||
|
; -DEINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
|
||||||
|
; -DEINK_LIMIT_GHOSTING_PX=1500 ; (Optional) How much image ghosting is tolerated
|
||||||
|
; -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||||
|
|
||||||
|
lib_deps =
|
||||||
|
${esp32s3_base.lib_deps}
|
||||||
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
|
zinggjm/GxEPD2@1.6.5
|
||||||
|
;# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
|
||||||
|
;https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
||||||
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
|
lewisxhe/SensorLib@0.3.3
|
||||||
56
variants/esp32s3/mini-epaper-s3/variant.h
Normal file
56
variants/esp32s3/mini-epaper-s3/variant.h
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
// Display (E-Ink)
|
||||||
|
|
||||||
|
#define PIN_EINK_CS 13
|
||||||
|
#define PIN_EINK_BUSY 10
|
||||||
|
#define PIN_EINK_RES 11
|
||||||
|
#define PIN_EINK_SCLK 14
|
||||||
|
#define PIN_EINK_MOSI 15
|
||||||
|
#define PIN_EINK_DC 12
|
||||||
|
#define PIN_EINK_EN 42
|
||||||
|
|
||||||
|
#define SPI_INTERFACES_COUNT 2
|
||||||
|
#define PIN_SPI1_MISO -1
|
||||||
|
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
||||||
|
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
||||||
|
|
||||||
|
#define I2C_SDA SDA
|
||||||
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
|
#define BATTERY_PIN 2 // A battery voltage measurement pin, voltage divider connected here to
|
||||||
|
// measure battery voltage ratio of voltage divider = 2.0 (assumption)
|
||||||
|
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||||
|
#define ADC_CHANNEL ADC1_GPIO2_CHANNEL
|
||||||
|
|
||||||
|
#define HAS_GPS 0
|
||||||
|
#undef GPS_RX_PIN
|
||||||
|
#undef GPS_TX_PIN
|
||||||
|
|
||||||
|
#define BUTTON_PIN 3
|
||||||
|
#define BUTTON_NEED_PULLUP
|
||||||
|
#define ALT_BUTTON_PIN 4
|
||||||
|
#define ALT_BUTTON_ACTIVE_LOW true
|
||||||
|
#define ALT_BUTTON_ACTIVE_PULLUP true
|
||||||
|
#define PIN_BUTTON3 0
|
||||||
|
|
||||||
|
// #define HAS_SDCARD 1
|
||||||
|
// #define SDCARD_USE_SOFT_SPI
|
||||||
|
|
||||||
|
// PCF85063 RTC Module
|
||||||
|
#define PCF85063_RTC 0x51
|
||||||
|
#define HAS_RTC 1
|
||||||
|
|
||||||
|
#define USE_SX1262
|
||||||
|
#define LORA_DIO1 5
|
||||||
|
#define LORA_SCK 8
|
||||||
|
#define LORA_MISO 6
|
||||||
|
#define LORA_MOSI 17
|
||||||
|
#define LORA_CS 7 // CS not connected; IO7 is free
|
||||||
|
#define LORA_RESET 21
|
||||||
|
|
||||||
|
#ifdef USE_SX1262
|
||||||
|
#define SX126X_CS LORA_CS
|
||||||
|
#define SX126X_DIO1 5
|
||||||
|
#define SX126X_BUSY 16
|
||||||
|
#define SX126X_RESET LORA_RESET
|
||||||
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user