From d998f70b5633e8b2f88823cfb73761625bbc3423 Mon Sep 17 00:00:00 2001 From: Jason P Date: Sun, 21 Sep 2025 14:04:17 -0500 Subject: [PATCH 01/11] Fix build errors (#8067) --- src/graphics/images.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/graphics/images.h b/src/graphics/images.h index 72dda7886..a6ad1c1cb 100644 --- a/src/graphics/images.h +++ b/src/graphics/images.h @@ -287,9 +287,7 @@ const uint8_t digital_icon_clock[] PROGMEM = {0b00111100, 0b01000010, 0b10000101 #define analog_icon_clock_height 8 const uint8_t analog_icon_clock[] PROGMEM = {0b11111111, 0b01000010, 0b00100100, 0b00011000, 0b00100100, 0b01000010, 0b01000010, 0b11111111}; -#ifdef M5STACK_UNITC6L -#include "img/icon_small.xbm" -#else + #define chirpy_width 38 #define chirpy_height 50 static unsigned char chirpy[] = { @@ -362,6 +360,9 @@ static unsigned char chirpy_hirez[] = { #define chirpy_small_image_height 8 static unsigned char small_chirpy[] = {0x7f, 0x41, 0x55, 0x55, 0x55, 0x55, 0x41, 0x7f}; +#ifdef M5STACK_UNITC6L +#include "img/icon_small.xbm" +#else #include "img/icon.xbm" #endif static_assert(sizeof(icon_bits) >= 0, "Silence unused variable warning"); \ No newline at end of file From 8e608e8186e370786703168a34f0e2e4de059593 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 23 Sep 2025 06:04:47 -0500 Subject: [PATCH 02/11] Heltec V4 is 16mb --- variants/esp32s3/heltec_v4/platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/variants/esp32s3/heltec_v4/platformio.ini b/variants/esp32s3/heltec_v4/platformio.ini index 0177342a4..1a448bc99 100644 --- a/variants/esp32s3/heltec_v4/platformio.ini +++ b/variants/esp32s3/heltec_v4/platformio.ini @@ -2,6 +2,7 @@ extends = esp32s3_base board = heltec_v4 board_check = true +board_build.partitions = default_16MB.csv build_flags = ${esp32s3_base.build_flags} -D HELTEC_V4 From 1968a009dd21303f6c5979bab21287e99dd4102b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 23 Sep 2025 07:31:25 -0500 Subject: [PATCH 03/11] Clear lasttoradio on BLE disconnect (#8095) * On disconnect, clear the lastToRadio buffer * Move it, bucko! --- src/nimble/NimbleBluetooth.cpp | 3 +++ src/platform/nrf52/NRF52Bluetooth.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 13446be45..0c4e30785 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -247,6 +247,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks bluetoothPhoneAPI->numBytes = 0; bluetoothPhoneAPI->queue_size = 0; } + + // Clear the last ToRadio packet buffer to avoid rejecting first packet from new connection + memset(lastToRadio, 0, sizeof(lastToRadio)); #ifdef NIMBLE_TWO // Restart Advertising ble->startAdvertising(); diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index f8366ae32..b457c35b7 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -28,6 +28,9 @@ static BLEDfuSecure bledfusecure; // static uint8_t fromRadioBytes[meshtastic_FromRadio_size]; static uint8_t toRadioBytes[meshtastic_ToRadio_size]; +// Last ToRadio value received from the phone +static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE]; + static uint16_t connectionHandle; class BluetoothPhoneAPI : public PhoneAPI @@ -74,6 +77,9 @@ void onDisconnect(uint16_t conn_handle, uint8_t reason) bluetoothPhoneAPI->close(); } + // Clear the last ToRadio packet buffer to avoid rejecting first packet from new connection + memset(lastToRadio, 0, sizeof(lastToRadio)); + // Notify UI (or any other interested firmware components) meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED); bluetoothStatus->updateStatus(&newStatus); @@ -145,8 +151,6 @@ void onFromRadioAuthorize(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_e } authorizeRead(conn_hdl); } -// Last ToRadio value received from the phone -static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE]; void onToRadioWrite(uint16_t conn_hdl, BLECharacteristic *chr, uint8_t *data, uint16_t len) { From 94d4bdf05cf1554be140ef855a2f7cfc8878fdba Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 23 Sep 2025 08:57:04 -0500 Subject: [PATCH 04/11] Revert "Fix build errors (#8067)" This reverts commit d998f70b5633e8b2f88823cfb73761625bbc3423. --- src/graphics/images.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/graphics/images.h b/src/graphics/images.h index a6ad1c1cb..72dda7886 100644 --- a/src/graphics/images.h +++ b/src/graphics/images.h @@ -287,7 +287,9 @@ const uint8_t digital_icon_clock[] PROGMEM = {0b00111100, 0b01000010, 0b10000101 #define analog_icon_clock_height 8 const uint8_t analog_icon_clock[] PROGMEM = {0b11111111, 0b01000010, 0b00100100, 0b00011000, 0b00100100, 0b01000010, 0b01000010, 0b11111111}; - +#ifdef M5STACK_UNITC6L +#include "img/icon_small.xbm" +#else #define chirpy_width 38 #define chirpy_height 50 static unsigned char chirpy[] = { @@ -360,9 +362,6 @@ static unsigned char chirpy_hirez[] = { #define chirpy_small_image_height 8 static unsigned char small_chirpy[] = {0x7f, 0x41, 0x55, 0x55, 0x55, 0x55, 0x41, 0x7f}; -#ifdef M5STACK_UNITC6L -#include "img/icon_small.xbm" -#else #include "img/icon.xbm" #endif static_assert(sizeof(icon_bits) >= 0, "Silence unused variable warning"); \ No newline at end of file From 1ed7aad976ca54ba7cc6b47caf78bc6aaa8622fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 06:01:31 -0500 Subject: [PATCH 05/11] Automated version bumps (#8100) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- bin/org.meshtastic.meshtasticd.metainfo.xml | 3 ++ debian/changelog | 45 ++------------------- version.properties | 2 +- 3 files changed, 7 insertions(+), 43 deletions(-) diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml index 090c141fa..0d03dd349 100644 --- a/bin/org.meshtastic.meshtasticd.metainfo.xml +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -87,6 +87,9 @@ + + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.11 + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.10 diff --git a/debian/changelog b/debian/changelog index 76e390001..15c8604f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,49 +1,10 @@ -meshtasticd (2.7.10.0) UNRELEASED; urgency=medium +meshtasticd (2.7.11.0) UNRELEASED; urgency=medium + [ Austin Lane ] * Initial packaging * Version 2.5.19 [ ] * GitHub Actions Automatic version bump - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ Ubuntu ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - [ ] - * GitHub Actions Automatic version bump - - -- Thu, 18 Sep 2025 22:11:37 +0000 + -- Wed, 24 Sep 2025 11:01:13 +0000 diff --git a/version.properties b/version.properties index cc0449a72..ce1205f2b 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 7 -build = 10 +build = 11 From 83be632a1a91d15ad3a33efe8e68df47ec5e1a21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 06:01:31 -0500 Subject: [PATCH 06/11] Automated version bumps (#8100) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- bin/org.meshtastic.meshtasticd.metainfo.xml | 3 +++ debian/changelog | 8 ++++++-- version.properties | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml index 090c141fa..0d03dd349 100644 --- a/bin/org.meshtastic.meshtasticd.metainfo.xml +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -87,6 +87,9 @@ + + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.11 + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.10 diff --git a/debian/changelog b/debian/changelog index d4ba6b7a0..15c8604f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,10 @@ -meshtasticd (2.7.10.0) UNRELEASED; urgency=medium +meshtasticd (2.7.11.0) UNRELEASED; urgency=medium + [ Austin Lane ] * Initial packaging * Version 2.5.19 - -- Austin Lane Thu, 02 Jan 2025 12:00:00 +0000 + [ ] + * GitHub Actions Automatic version bump + + -- Wed, 24 Sep 2025 11:01:13 +0000 diff --git a/version.properties b/version.properties index cc0449a72..ce1205f2b 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 7 -build = 10 +build = 11 From 1835ff2d781ab505e2e5ae28829b97d7591ada5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 06:05:36 -0500 Subject: [PATCH 07/11] Upgrade trunk (#8094) Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 4dd040287..491ab32ba 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -9,7 +9,7 @@ plugins: lint: enabled: - checkov@3.2.471 - - renovate@41.118.1 + - renovate@41.125.3 - prettier@3.6.2 - trufflehog@3.90.8 - yamllint@1.37.1 @@ -23,7 +23,7 @@ lint: - svgo@4.0.0 - actionlint@1.7.7 - flake8@7.3.0 - - hadolint@2.13.1 + - hadolint@2.14.0 - shfmt@3.6.0 - shellcheck@0.11.0 - black@25.9.0 From c33c36831574d58fa7b1478f40ecf6dc41f7406d Mon Sep 17 00:00:00 2001 From: Quency-D <55523105+Quency-D@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:14:24 +0800 Subject: [PATCH 08/11] Add three expansion screens for heltec mesh solar. (#7995) * Add three expansion screens for heltec mesh solar. * delete whitespace Update variants/nrf52840/heltec_mesh_solar/variant.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * delete whitespace Update variants/nrf52840/heltec_mesh_solar/platformio.ini Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Meadors --- src/graphics/EInkDisplay2.cpp | 2 +- src/graphics/EInkDisplay2.h | 2 +- .../heltec_mesh_solar/nicheGraphics.h | 90 +++++++++++++++++ .../nrf52840/heltec_mesh_solar/platformio.ini | 99 ++++++++++++++++++- .../nrf52840/heltec_mesh_solar/variant.cpp | 5 + variants/nrf52840/heltec_mesh_solar/variant.h | 16 ++- 6 files changed, 202 insertions(+), 12 deletions(-) create mode 100644 variants/nrf52840/heltec_mesh_solar/nicheGraphics.h diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index c0c09cc27..4209baf5d 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -243,7 +243,7 @@ bool EInkDisplay::connect() adafruitDisplay->setRotation(1); adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT); } -#elif defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) +#elif defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) { spi1 = &SPI1; spi1->begin(); diff --git a/src/graphics/EInkDisplay2.h b/src/graphics/EInkDisplay2.h index b4cee81fe..9975527aa 100644 --- a/src/graphics/EInkDisplay2.h +++ b/src/graphics/EInkDisplay2.h @@ -84,7 +84,7 @@ class EInkDisplay : public OLEDDisplay SPIClass *hspi = NULL; #endif -#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) +#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) SPIClass *spi1 = NULL; #endif diff --git a/variants/nrf52840/heltec_mesh_solar/nicheGraphics.h b/variants/nrf52840/heltec_mesh_solar/nicheGraphics.h new file mode 100644 index 000000000..125f50590 --- /dev/null +++ b/variants/nrf52840/heltec_mesh_solar/nicheGraphics.h @@ -0,0 +1,90 @@ +#pragma once + +#include "configuration.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +// InkHUD-specific components +// --------------------------- +#include "graphics/niche/InkHUD/InkHUD.h" + +// Applets +#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h" +#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h" +#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h" +#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h" + +// Shared NicheGraphics components +// -------------------------------- +#include "graphics/niche/Drivers/EInk/E0213A367.h" +#include "graphics/niche/Inputs/TwoButton.h" + +void setupNicheGraphics() +{ + using namespace NicheGraphics; + + // SPI + // ----------------------------- + + // For NRF52 platforms, SPI pins are defined in variant.h + SPI1.begin(); + + // E-Ink Driver + // ----------------------------- + + Drivers::EInk *driver = new Drivers::E0213A367; + driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES); + + // InkHUD + // ---------------------------- + + InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance(); + + // Set the E-Ink driver + inkhud->setDriver(driver); + + // Set how many FAST updates per FULL update + // Set how unhealthy additional FAST updates beyond this number are + inkhud->setDisplayResilience(10, 1.5); + + // Select fonts + InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252; + InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252; + InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252; + + // Customize default settings + inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? + inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise + inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users + inkhud->persistence->settings.optionalMenuItems.nextTile = true; + + // Pick applets + // Note: order of applets determines priority of "auto-show" feature + inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown + inkhud->addApplet("DMs", new InkHUD::DMApplet); // - + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // - + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // - + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // - + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, no autoshow, default on tile 0 + + // Start running InkHUD + inkhud->begin(); + + // Buttons + // -------------------------- + + Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component + + // #0: Main User Button + buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin()); + buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); }); + buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); }); + + // Begin handling button events + buttons->start(); +} + +#endif \ No newline at end of file diff --git a/variants/nrf52840/heltec_mesh_solar/platformio.ini b/variants/nrf52840/heltec_mesh_solar/platformio.ini index 65d26dc40..625dd1d43 100644 --- a/variants/nrf52840/heltec_mesh_solar/platformio.ini +++ b/variants/nrf52840/heltec_mesh_solar/platformio.ini @@ -1,5 +1,5 @@ ; First prototype nrf52840/sx1262 device -[env:heltec-mesh-solar] +[heltec_mesh_solar_base] extends = nrf52840_base board = heltec_mesh_solar board_level = pr @@ -17,3 +17,100 @@ lib_deps = https://github.com/NMIoT/meshsolar/archive/dfc5330dad443982e6cdd37a61d33fc7252f468b.zip lewisxhe/PCF8563_Library@^1.0.1 ArduinoJson@6.21.4 +[env:heltec-mesh-solar] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DSPI_INTERFACES_COUNT=1 + +[env:heltec-mesh-solar-eink] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DHELTEC_MESH_SOLAR_EINK + -DSPI_INTERFACES_COUNT=2 + -DUSE_EINK + -DPIN_SCREEN_VDD_CTL=3 + -DPIN_EINK_CS=41 + -DPIN_EINK_BUSY=11 + -DPIN_EINK_DC=13 + -DPIN_EINK_RES=40 + -DPIN_EINK_SCLK=12 + -DPIN_EINK_MOSI=2 + -DPIN_SPI1_MISO=-1 + -DPIN_SPI1_MOSI=PIN_EINK_MOSI + -DPIN_SPI1_SCK=PIN_EINK_SCLK + -DEINK_DISPLAY_MODEL=GxEPD2_213_E0213A367 + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" +lib_deps = + ${heltec_mesh_solar_base.lib_deps} + https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip + +[env:heltec-mesh-solar-inkhud] +extends = heltec_mesh_solar_base, inkhud +build_src_filter = ${heltec_mesh_solar_base.build_src_filter} ${inkhud.build_src_filter} +build_flags = ${heltec_mesh_solar_base.build_flags} + ${inkhud.build_flags} + -DHELTEC_MESH_SOLAR_INKHUD + -DSPI_INTERFACES_COUNT=2 + -DPIN_SCREEN_VDD_CTL=3 + -DPIN_EINK_CS=41 + -DPIN_EINK_BUSY=11 + -DPIN_EINK_DC=13 + -DPIN_EINK_RES=40 + -DPIN_EINK_SCLK=12 + -DPIN_EINK_MOSI=2 + -DPIN_SPI1_MISO=-1 + -DPIN_SPI1_MOSI=PIN_EINK_MOSI + -DPIN_SPI1_SCK=PIN_EINK_SCLK +lib_deps = + ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX + ${heltec_mesh_solar_base.lib_deps} + + +[env:heltec-mesh-solar-oled] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DHELTEC_MESH_SOLAR_OLED + -DSPI_INTERFACES_COUNT=1 + -DPIN_SCREEN_VDD_CTL=3 + -DHAS_SCREEN=1 + -DRESET_OLED=40 + -DPIN_WIRE_SDA=2 + -DPIN_WIRE_SCL=12 + +[env:heltec-mesh-solar-tft] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DHELTEC_MESH_SOLAR_TFT + -DSPI_INTERFACES_COUNT=2 + -DUSE_ST7789 + -DST7789_NSS=41 + -DST7789_RS=13 + -DST7789_SDA=2 + -DST7789_SCK=12 + -DST7789_RESET=40 + -DST7789_MISO=-1 + -DST7789_BUSY=-1 + -DVTFT_CTRL=3 + -DVTFT_LEDA=11 + -DTFT_BACKLIGHT_ON=HIGH + -DST7789_SPI_HOST=SPI2_HOST + -DSPI_FREQUENCY=10000000 + -DSPI_READ_FREQUENCY=10000000 + -DTFT_HEIGHT=170 + -DTFT_WIDTH=320 + -DTFT_OFFSET_X=0 + -DTFT_OFFSET_Y=0 + -DBRIGHTNESS_DEFAULT=100 + -DPIN_SPI1_MISO=ST7789_MISO + -DPIN_SPI1_MOSI=ST7789_SDA + -DPIN_SPI1_SCK=ST7789_SCK +lib_deps = + ${heltec_mesh_solar_base.lib_deps} + https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip diff --git a/variants/nrf52840/heltec_mesh_solar/variant.cpp b/variants/nrf52840/heltec_mesh_solar/variant.cpp index 8236d7cf4..ab54621cc 100644 --- a/variants/nrf52840/heltec_mesh_solar/variant.cpp +++ b/variants/nrf52840/heltec_mesh_solar/variant.cpp @@ -33,4 +33,9 @@ const uint32_t g_ADigitalPinMap[] = { void initVariant() { pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT); +#if defined(PIN_SCREEN_VDD_CTL) + pinMode(PIN_SCREEN_VDD_CTL, OUTPUT); + digitalWrite(PIN_SCREEN_VDD_CTL, LOW); // Start with power on +#endif + } diff --git a/variants/nrf52840/heltec_mesh_solar/variant.h b/variants/nrf52840/heltec_mesh_solar/variant.h index 33c2b2556..161a66a5a 100644 --- a/variants/nrf52840/heltec_mesh_solar/variant.h +++ b/variants/nrf52840/heltec_mesh_solar/variant.h @@ -40,7 +40,7 @@ extern "C" { #define NUM_ANALOG_OUTPUTS (0) -#define PIN_LED1 (0 + 12) // green (confirmed on 1.0 board) +#define PIN_LED1 (0 + 4) // green (confirmed on 1.0 board) #define LED_BLUE PIN_LED1 // fake for bluefruit library #define LED_GREEN PIN_LED1 #define LED_BUILTIN LED_GREEN @@ -63,7 +63,6 @@ No longer populated on PCB */ #define PIN_SERIAL2_RX (0 + 9) #define PIN_SERIAL2_TX (0 + 10) -// #define PIN_SERIAL2_EN (0 + 17) /* * I2C @@ -71,16 +70,16 @@ No longer populated on PCB #define WIRE_INTERFACES_COUNT 2 +#ifndef HELTEC_MESH_SOLAR_OLED // I2C bus 0 -// Routed to footprint for PCF8563TS RTC -// Not populated on T114 V1, maybe in future? -#define PIN_WIRE_SDA (0 + 6) // P0.26 -#define PIN_WIRE_SCL (0 + 26) // P0.26 +#define PIN_WIRE_SDA (0 + 6) +#define PIN_WIRE_SCL (0 + 26) +#endif // I2C bus 1 // Available on header pins, for general use -#define PIN_WIRE1_SDA (0 + 30) // P0.30 -#define PIN_WIRE1_SCL (0 + 5) // P0.13 +#define PIN_WIRE1_SDA (0 + 30) +#define PIN_WIRE1_SCL (0 + 5) /* * Lora radio @@ -129,7 +128,6 @@ No longer populated on PCB /* * SPI Interfaces */ -#define SPI_INTERFACES_COUNT 1 // For LORA, spi 0 #define PIN_SPI_MISO (0 + 23) From ca3c45a2f39a947fdcd80dbd33f5ee6699701b4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 06:15:00 -0500 Subject: [PATCH 09/11] Update Adafruit BusIO to v1.17.4 (#8098) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 5da8c2e67..bd2e8fa37 100644 --- a/platformio.ini +++ b/platformio.ini @@ -125,7 +125,7 @@ lib_deps = [environmental_base] lib_deps = # renovate: datasource=custom.pio depName=Adafruit BusIO packageName=adafruit/library/Adafruit BusIO - adafruit/Adafruit BusIO@1.17.3 + adafruit/Adafruit BusIO@1.17.4 # renovate: datasource=custom.pio depName=Adafruit Unified Sensor packageName=adafruit/library/Adafruit Unified Sensor adafruit/Adafruit Unified Sensor@1.1.15 # renovate: datasource=custom.pio depName=Adafruit BMP280 packageName=adafruit/library/Adafruit BMP280 Library From 949f881ae8cc9ec9c2a330168ef81a80be8db4a4 Mon Sep 17 00:00:00 2001 From: Quency-D <55523105+Quency-D@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:14:24 +0800 Subject: [PATCH 10/11] Add three expansion screens for heltec mesh solar. (#7995) * Add three expansion screens for heltec mesh solar. * delete whitespace Update variants/nrf52840/heltec_mesh_solar/variant.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * delete whitespace Update variants/nrf52840/heltec_mesh_solar/platformio.ini Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Meadors --- src/graphics/EInkDisplay2.cpp | 2 +- src/graphics/EInkDisplay2.h | 2 +- .../heltec_mesh_solar/nicheGraphics.h | 90 +++++++++++++++++ .../nrf52840/heltec_mesh_solar/platformio.ini | 99 ++++++++++++++++++- .../nrf52840/heltec_mesh_solar/variant.cpp | 5 + variants/nrf52840/heltec_mesh_solar/variant.h | 16 ++- 6 files changed, 202 insertions(+), 12 deletions(-) create mode 100644 variants/nrf52840/heltec_mesh_solar/nicheGraphics.h diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index c0c09cc27..4209baf5d 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -243,7 +243,7 @@ bool EInkDisplay::connect() adafruitDisplay->setRotation(1); adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT); } -#elif defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) +#elif defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) { spi1 = &SPI1; spi1->begin(); diff --git a/src/graphics/EInkDisplay2.h b/src/graphics/EInkDisplay2.h index b4cee81fe..9975527aa 100644 --- a/src/graphics/EInkDisplay2.h +++ b/src/graphics/EInkDisplay2.h @@ -84,7 +84,7 @@ class EInkDisplay : public OLEDDisplay SPIClass *hspi = NULL; #endif -#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) +#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) SPIClass *spi1 = NULL; #endif diff --git a/variants/nrf52840/heltec_mesh_solar/nicheGraphics.h b/variants/nrf52840/heltec_mesh_solar/nicheGraphics.h new file mode 100644 index 000000000..125f50590 --- /dev/null +++ b/variants/nrf52840/heltec_mesh_solar/nicheGraphics.h @@ -0,0 +1,90 @@ +#pragma once + +#include "configuration.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +// InkHUD-specific components +// --------------------------- +#include "graphics/niche/InkHUD/InkHUD.h" + +// Applets +#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h" +#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h" +#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h" +#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h" + +// Shared NicheGraphics components +// -------------------------------- +#include "graphics/niche/Drivers/EInk/E0213A367.h" +#include "graphics/niche/Inputs/TwoButton.h" + +void setupNicheGraphics() +{ + using namespace NicheGraphics; + + // SPI + // ----------------------------- + + // For NRF52 platforms, SPI pins are defined in variant.h + SPI1.begin(); + + // E-Ink Driver + // ----------------------------- + + Drivers::EInk *driver = new Drivers::E0213A367; + driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES); + + // InkHUD + // ---------------------------- + + InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance(); + + // Set the E-Ink driver + inkhud->setDriver(driver); + + // Set how many FAST updates per FULL update + // Set how unhealthy additional FAST updates beyond this number are + inkhud->setDisplayResilience(10, 1.5); + + // Select fonts + InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252; + InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252; + InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252; + + // Customize default settings + inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? + inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise + inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users + inkhud->persistence->settings.optionalMenuItems.nextTile = true; + + // Pick applets + // Note: order of applets determines priority of "auto-show" feature + inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown + inkhud->addApplet("DMs", new InkHUD::DMApplet); // - + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // - + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // - + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // - + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, no autoshow, default on tile 0 + + // Start running InkHUD + inkhud->begin(); + + // Buttons + // -------------------------- + + Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component + + // #0: Main User Button + buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin()); + buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); }); + buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); }); + + // Begin handling button events + buttons->start(); +} + +#endif \ No newline at end of file diff --git a/variants/nrf52840/heltec_mesh_solar/platformio.ini b/variants/nrf52840/heltec_mesh_solar/platformio.ini index 65d26dc40..625dd1d43 100644 --- a/variants/nrf52840/heltec_mesh_solar/platformio.ini +++ b/variants/nrf52840/heltec_mesh_solar/platformio.ini @@ -1,5 +1,5 @@ ; First prototype nrf52840/sx1262 device -[env:heltec-mesh-solar] +[heltec_mesh_solar_base] extends = nrf52840_base board = heltec_mesh_solar board_level = pr @@ -17,3 +17,100 @@ lib_deps = https://github.com/NMIoT/meshsolar/archive/dfc5330dad443982e6cdd37a61d33fc7252f468b.zip lewisxhe/PCF8563_Library@^1.0.1 ArduinoJson@6.21.4 +[env:heltec-mesh-solar] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DSPI_INTERFACES_COUNT=1 + +[env:heltec-mesh-solar-eink] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DHELTEC_MESH_SOLAR_EINK + -DSPI_INTERFACES_COUNT=2 + -DUSE_EINK + -DPIN_SCREEN_VDD_CTL=3 + -DPIN_EINK_CS=41 + -DPIN_EINK_BUSY=11 + -DPIN_EINK_DC=13 + -DPIN_EINK_RES=40 + -DPIN_EINK_SCLK=12 + -DPIN_EINK_MOSI=2 + -DPIN_SPI1_MISO=-1 + -DPIN_SPI1_MOSI=PIN_EINK_MOSI + -DPIN_SPI1_SCK=PIN_EINK_SCLK + -DEINK_DISPLAY_MODEL=GxEPD2_213_E0213A367 + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" +lib_deps = + ${heltec_mesh_solar_base.lib_deps} + https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip + +[env:heltec-mesh-solar-inkhud] +extends = heltec_mesh_solar_base, inkhud +build_src_filter = ${heltec_mesh_solar_base.build_src_filter} ${inkhud.build_src_filter} +build_flags = ${heltec_mesh_solar_base.build_flags} + ${inkhud.build_flags} + -DHELTEC_MESH_SOLAR_INKHUD + -DSPI_INTERFACES_COUNT=2 + -DPIN_SCREEN_VDD_CTL=3 + -DPIN_EINK_CS=41 + -DPIN_EINK_BUSY=11 + -DPIN_EINK_DC=13 + -DPIN_EINK_RES=40 + -DPIN_EINK_SCLK=12 + -DPIN_EINK_MOSI=2 + -DPIN_SPI1_MISO=-1 + -DPIN_SPI1_MOSI=PIN_EINK_MOSI + -DPIN_SPI1_SCK=PIN_EINK_SCLK +lib_deps = + ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX + ${heltec_mesh_solar_base.lib_deps} + + +[env:heltec-mesh-solar-oled] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DHELTEC_MESH_SOLAR_OLED + -DSPI_INTERFACES_COUNT=1 + -DPIN_SCREEN_VDD_CTL=3 + -DHAS_SCREEN=1 + -DRESET_OLED=40 + -DPIN_WIRE_SDA=2 + -DPIN_WIRE_SCL=12 + +[env:heltec-mesh-solar-tft] +extends = heltec_mesh_solar_base +build_flags = ${heltec_mesh_solar_base.build_flags} + -DHELTEC_MESH_SOLAR_TFT + -DSPI_INTERFACES_COUNT=2 + -DUSE_ST7789 + -DST7789_NSS=41 + -DST7789_RS=13 + -DST7789_SDA=2 + -DST7789_SCK=12 + -DST7789_RESET=40 + -DST7789_MISO=-1 + -DST7789_BUSY=-1 + -DVTFT_CTRL=3 + -DVTFT_LEDA=11 + -DTFT_BACKLIGHT_ON=HIGH + -DST7789_SPI_HOST=SPI2_HOST + -DSPI_FREQUENCY=10000000 + -DSPI_READ_FREQUENCY=10000000 + -DTFT_HEIGHT=170 + -DTFT_WIDTH=320 + -DTFT_OFFSET_X=0 + -DTFT_OFFSET_Y=0 + -DBRIGHTNESS_DEFAULT=100 + -DPIN_SPI1_MISO=ST7789_MISO + -DPIN_SPI1_MOSI=ST7789_SDA + -DPIN_SPI1_SCK=ST7789_SCK +lib_deps = + ${heltec_mesh_solar_base.lib_deps} + https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip diff --git a/variants/nrf52840/heltec_mesh_solar/variant.cpp b/variants/nrf52840/heltec_mesh_solar/variant.cpp index 8236d7cf4..ab54621cc 100644 --- a/variants/nrf52840/heltec_mesh_solar/variant.cpp +++ b/variants/nrf52840/heltec_mesh_solar/variant.cpp @@ -33,4 +33,9 @@ const uint32_t g_ADigitalPinMap[] = { void initVariant() { pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT); +#if defined(PIN_SCREEN_VDD_CTL) + pinMode(PIN_SCREEN_VDD_CTL, OUTPUT); + digitalWrite(PIN_SCREEN_VDD_CTL, LOW); // Start with power on +#endif + } diff --git a/variants/nrf52840/heltec_mesh_solar/variant.h b/variants/nrf52840/heltec_mesh_solar/variant.h index 33c2b2556..161a66a5a 100644 --- a/variants/nrf52840/heltec_mesh_solar/variant.h +++ b/variants/nrf52840/heltec_mesh_solar/variant.h @@ -40,7 +40,7 @@ extern "C" { #define NUM_ANALOG_OUTPUTS (0) -#define PIN_LED1 (0 + 12) // green (confirmed on 1.0 board) +#define PIN_LED1 (0 + 4) // green (confirmed on 1.0 board) #define LED_BLUE PIN_LED1 // fake for bluefruit library #define LED_GREEN PIN_LED1 #define LED_BUILTIN LED_GREEN @@ -63,7 +63,6 @@ No longer populated on PCB */ #define PIN_SERIAL2_RX (0 + 9) #define PIN_SERIAL2_TX (0 + 10) -// #define PIN_SERIAL2_EN (0 + 17) /* * I2C @@ -71,16 +70,16 @@ No longer populated on PCB #define WIRE_INTERFACES_COUNT 2 +#ifndef HELTEC_MESH_SOLAR_OLED // I2C bus 0 -// Routed to footprint for PCF8563TS RTC -// Not populated on T114 V1, maybe in future? -#define PIN_WIRE_SDA (0 + 6) // P0.26 -#define PIN_WIRE_SCL (0 + 26) // P0.26 +#define PIN_WIRE_SDA (0 + 6) +#define PIN_WIRE_SCL (0 + 26) +#endif // I2C bus 1 // Available on header pins, for general use -#define PIN_WIRE1_SDA (0 + 30) // P0.30 -#define PIN_WIRE1_SCL (0 + 5) // P0.13 +#define PIN_WIRE1_SDA (0 + 30) +#define PIN_WIRE1_SCL (0 + 5) /* * Lora radio @@ -129,7 +128,6 @@ No longer populated on PCB /* * SPI Interfaces */ -#define SPI_INTERFACES_COUNT 1 // For LORA, spi 0 #define PIN_SPI_MISO (0 + 23) From db55d8a59d7fe8da4a5762a1ee25c4d99de88da5 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 24 Sep 2025 06:16:38 -0500 Subject: [PATCH 11/11] Trunk --- .../nrf52840/heltec_mesh_solar/variant.cpp | 7 +++---- variants/nrf52840/heltec_mesh_solar/variant.h | 19 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/variants/nrf52840/heltec_mesh_solar/variant.cpp b/variants/nrf52840/heltec_mesh_solar/variant.cpp index ab54621cc..c13f006d7 100644 --- a/variants/nrf52840/heltec_mesh_solar/variant.cpp +++ b/variants/nrf52840/heltec_mesh_solar/variant.cpp @@ -32,10 +32,9 @@ const uint32_t g_ADigitalPinMap[] = { void initVariant() { - pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT); + pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT); #if defined(PIN_SCREEN_VDD_CTL) - pinMode(PIN_SCREEN_VDD_CTL, OUTPUT); - digitalWrite(PIN_SCREEN_VDD_CTL, LOW); // Start with power on + pinMode(PIN_SCREEN_VDD_CTL, OUTPUT); + digitalWrite(PIN_SCREEN_VDD_CTL, LOW); // Start with power on #endif - } diff --git a/variants/nrf52840/heltec_mesh_solar/variant.h b/variants/nrf52840/heltec_mesh_solar/variant.h index 161a66a5a..7c43d8ba7 100644 --- a/variants/nrf52840/heltec_mesh_solar/variant.h +++ b/variants/nrf52840/heltec_mesh_solar/variant.h @@ -39,16 +39,15 @@ extern "C" { #define NUM_ANALOG_INPUTS (1) #define NUM_ANALOG_OUTPUTS (0) - -#define PIN_LED1 (0 + 4) // green (confirmed on 1.0 board) +#define PIN_LED1 (0 + 4) // green (confirmed on 1.0 board) #define LED_BLUE PIN_LED1 // fake for bluefruit library #define LED_GREEN PIN_LED1 #define LED_BUILTIN LED_GREEN -#define LED_STATE_ON 0 // State when LED is lit +#define LED_STATE_ON 0 // State when LED is lit #define HAS_NEOPIXEL // Enable the use of neopixels #define NEOPIXEL_COUNT 1 // How many neopixels are connected -#define NEOPIXEL_DATA (32+15) // gpio pin used to send data to the neopixels +#define NEOPIXEL_DATA (32 + 15) // gpio pin used to send data to the neopixels #define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use /* @@ -88,14 +87,14 @@ No longer populated on PCB #define USE_SX1262 // #define USE_SX1268 #define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead -#define LORA_CS (0 + 24) +#define LORA_CS (0 + 24) #define SX126X_DIO1 (0 + 20) // Note DIO2 is attached internally to the module to an analog switch for TX/RX switching // #define SX1262_DIO3 (0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the // main // CPU? -#define SX126X_BUSY (0 + 17) +#define SX126X_BUSY (0 + 17) #define SX126X_RESET (0 + 25) // Not really an E22 but TTGO seems to be trying to clone that #define SX126X_DIO2_AS_RF_SWITCH @@ -132,16 +131,16 @@ No longer populated on PCB // For LORA, spi 0 #define PIN_SPI_MISO (0 + 23) #define PIN_SPI_MOSI (0 + 22) -#define PIN_SPI_SCK (0 + 19) +#define PIN_SPI_SCK (0 + 19) // #define PIN_PWR_EN (0 + 6) // To debug via the segger JLINK console rather than the CDC-ACM serial device // #define USE_SEGGER -#define BQ4050_SDA_PIN (32+1) // I2C data line pin -#define BQ4050_SCL_PIN (32+0) // I2C clock line pin -#define BQ4050_EMERGENCY_SHUTDOWN_PIN (32+3) // Emergency shutdown pin +#define BQ4050_SDA_PIN (32 + 1) // I2C data line pin +#define BQ4050_SCL_PIN (32 + 0) // I2C clock line pin +#define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin #define HAS_RTC 0 #ifdef __cplusplus