Compare commits

...

13 Commits

Author SHA1 Message Date
Jonathan Bennett
5dd06edd00 Add ledOff if not defined 2026-01-29 13:24:10 -06:00
Jonathan Bennett
eeb7373043 Remove errant symbol 2026-01-29 13:23:49 -06:00
Jonathan Bennett
dbded86dcb More variant.h cleanup. LED_NOTIFICATION, remove dead code, etc (#9477) 2026-01-29 12:51:48 -06:00
Jonathan Bennett
45fbc0f9d3 Remove stale variant.h defines (#9470)
* Remove noop CANNED_MESSAGE_MODULE_ENABLE define

* Remove over-eager warning removal

* Remove unused LED_CONN

* Dead defines removal

* Rename oddball LED pin name

* Rename second oddball LED pin name

* Remove another dead define
2026-01-29 10:58:06 -06:00
Agustín Mista
61b39acc7d Add initial Nix shell (#8530)
* Add initial Nix shell

* Update flake.nix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-29 10:06:58 -06:00
Jorropo
8af9e7fbdc enable long interleaving mode for LR11x0 and SX128x (#9399)
Using long interleaving is not a breaking change, the receiver node is able
to use the lora header to know if LI encoding is used or not and will
decode LI packets correctly.

However the problem is SX127x and other first generation LoRa IP which do not
support LI at all, for theses it is a breaking change.

HOWEVER due to the sync word bug the LR11x0 already can't talk with SX127x,
so if we enable LI on theses no one would be able to tell.
Same for SX128x altho this is because it works on 2.4Ghz which is incompatible with SX127x.

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-01-29 06:44:17 -06:00
Andrew Yong
1f7ed6888a feat(stm32): Add Milesight GS301 Bathroom Odor Detector (#9359)
- STM32WLE5CCU6
- NFC (unsupported): NXP NT3H2211W0FTTJ (NTAG I2C plus: NFC Forum T2T with I2C interface, password protection and energy harvesting)
- Sensor (unsupported): Analog ADuCM355 (SHTC3 is connected to ADuCM355 and not directly accessible)
- Bicolor LED
- User button (presently not functional in STM32 variants)

The definitions for sensor voltage control are present but commented out to save power, due to lack of sensor support.

Powered by 4x 4000mAh RAMWAY ER18505 Li-SOCl2 batteries.

Flashing:

1. Power down device (remove batteries)
2. Connect USB-UART to J1 (USART2), pinout is below, do not connect +3V3 pin yet
3. Short BOOT pins next to J1
4. Connect +3V3 pin or insert batteries while BOOT pins are shorted
5. Use STM32CubeProgrammer, connect by UART mode
6. Load firmware .hex and download

J1 (USART2); Molex Picoblade (P=1.25mm * 4)

1. +3V3
2. PA3_USART2_RX_J1
3. PA2_USART2_TX_J1
4. GND

Signed-off-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-01-29 06:43:48 -06:00
treysis
31bf51b3f2 Add support for the hardware buttons on Bluetooth Nugget device (#9468)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-01-29 06:38:49 -06:00
Justin E. Mann
334a4f04cd Fix logic for rak12035 sensor default config and improve messaging (#9414)
* better logic to check if the RAK12035 soil sensor is calibrated, better log messaging if either of the default values were used.

* .

* changes to how default calibration is done and a message it the default calibration is used pointing to the actual calibration sketch so the user can find it and use it to improve accuracy.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-01-29 06:29:15 -06:00
Ben Meadors
415686dd06 Trunk 2026-01-29 05:56:19 -06:00
Quency-D
b2f2f6b305 Add a watchdog module to meshsolar. (#9337)
* add watchdog module

* Restore the code in power.h

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-01-28 20:41:27 -06:00
Jonathan Bennett
df400850c1 Undefine LED_BUILTIN where needed 2026-01-28 18:56:57 -06:00
Jonathan Bennett
6ab2f02dbc re-add unintentionally removed include 2026-01-28 17:53:12 -06:00
119 changed files with 422 additions and 327 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use nix

3
.gitignore vendored
View File

@@ -50,3 +50,6 @@ idf_component.yml
CMakeLists.txt CMakeLists.txt
/sdkconfig.* /sdkconfig.*
.dummy/* .dummy/*
# PYTHONPATH used by the Nix shell
.python3

44
flake.lock generated Normal file
View File

@@ -0,0 +1,44 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1766314097,
"narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

66
flake.nix Normal file
View File

@@ -0,0 +1,66 @@
{
description = "Nix flake to compile Meshtastic firmware";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# Shim to make flake.nix work with stable Nix.
flake-compat = {
url = "github:NixOS/flake-compat";
flake = false;
};
};
outputs =
inputs:
let
lib = inputs.nixpkgs.lib;
forAllSystems =
fn:
lib.genAttrs lib.systems.flakeExposed (
system:
fn {
pkgs = import inputs.nixpkgs {
inherit system;
};
inherit system;
}
);
in
{
devShells = forAllSystems (
{ pkgs, ... }:
let
python3 = pkgs.python312.withPackages (
ps: with ps; [
google
]
);
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
python3
platformio
];
shellHook = ''
# Set up PlatformIO to use a local core directory.
export PLATFORMIO_CORE_DIR=$PWD/.platformio
# Tell pip to put packages into $PIP_PREFIX instead of the usual
# location. This is especially necessary under NixOS to avoid having
# pip trying to write to the read-only Nix store. For more info,
# see https://wiki.nixos.org/wiki/Python
export PIP_PREFIX=$PWD/.python3
export PYTHONPATH="$PIP_PREFIX/${python3.sitePackages}"
export PATH="$PIP_PREFIX/bin:$PATH"
# Avoids reproducibility issues with some Python packages
# See https://nixos.org/manual/nixpkgs/stable/#python-setup.py-bdist_wheel-cannot-create-.whl
unset SOURCE_DATE_EPOCH
'';
};
}
);
};
}

12
shell.nix Normal file
View File

@@ -0,0 +1,12 @@
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url =
lock.nodes.${nodeName}.locked.url
or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
) { src = ./.; }).shellNix

View File

@@ -816,6 +816,9 @@ void Power::shutdown()
#endif #endif
#ifdef PIN_LED3 #ifdef PIN_LED3
ledOff(PIN_LED3); ledOff(PIN_LED3);
#endif
#ifdef LED_NOTIFICATION
ledOff(LED_NOTIFICATION);
#endif #endif
doDeepSleep(DELAY_FOREVER, true, true); doDeepSleep(DELAY_FOREVER, true, true);
#elif defined(ARCH_PORTDUINO) #elif defined(ARCH_PORTDUINO)

View File

@@ -428,12 +428,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define HAS_RGB_LED #define HAS_RGB_LED
#endif #endif
#ifndef LED_STATE_OFF
#define LED_STATE_OFF 0
#endif
#ifndef LED_STATE_ON #ifndef LED_STATE_ON
#define LED_STATE_ON 1 #define LED_STATE_ON 1
#endif #endif
#ifndef LED_STATE_OFF
#define LED_STATE_OFF (LED_STATE_ON ^ 1)
#endif
#ifndef ledOff
#define ledOff(pin) pinMode(pin, INPUT)
#endif
// default mapping of pins // default mapping of pins
#if defined(PIN_BUTTON2) && !defined(CANCEL_BUTTON_PIN) #if defined(PIN_BUTTON2) && !defined(CANCEL_BUTTON_PIN)

View File

@@ -5,7 +5,6 @@
SerialKeyboard *globalSerialKeyboard = nullptr; SerialKeyboard *globalSerialKeyboard = nullptr;
#ifdef INPUTBROKER_SERIAL_TYPE #ifdef INPUTBROKER_SERIAL_TYPE
#define CANNED_MESSAGE_MODULE_ENABLE 1 // in case it's not set in the variant file
#if INPUTBROKER_SERIAL_TYPE == 1 // It's a Chatter #if INPUTBROKER_SERIAL_TYPE == 1 // It's a Chatter
// 3 SHIFT level (lower case, upper case, numbers), up to 4 repeated presses, button number // 3 SHIFT level (lower case, upper case, numbers), up to 4 repeated presses, button number

View File

@@ -354,9 +354,9 @@ void setup()
digitalWrite(LED_POWER, LED_STATE_ON); digitalWrite(LED_POWER, LED_STATE_ON);
#endif #endif
#ifdef USER_LED #ifdef LED_NOTIFICATION
pinMode(USER_LED, OUTPUT); pinMode(LED_NOTIFICATION, OUTPUT);
digitalWrite(USER_LED, HIGH ^ LED_STATE_ON); digitalWrite(LED_NOTIFICATION, HIGH ^ LED_STATE_ON);
#endif #endif
#ifdef WIFI_LED #ifdef WIFI_LED

View File

@@ -170,7 +170,7 @@ template <typename T> bool LR11x0Interface<T>::reconfigure()
if (err != RADIOLIB_ERR_NONE) if (err != RADIOLIB_ERR_NONE)
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);
err = lora.setCodingRate(cr); err = lora.setCodingRate(cr, cr != 7); // use long interleaving except if CR is 4/7 which doesn't support it
if (err != RADIOLIB_ERR_NONE) if (err != RADIOLIB_ERR_NONE)
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);

View File

@@ -824,16 +824,10 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.external_notification.output_ms = 500; moduleConfig.external_notification.output_ms = 500;
moduleConfig.external_notification.nag_timeout = 2; moduleConfig.external_notification.nag_timeout = 2;
#endif #endif
#if defined(RAK4630) || defined(RAK11310) || defined(RAK3312) || defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3) || \ #if defined(LED_NOTIFICATION)
defined(ELECROW_ThinkNode_M4) || defined(ELECROW_ThinkNode_M6)
// Default to PIN_LED2 for external notification output (LED color depends on device variant)
moduleConfig.external_notification.enabled = true; moduleConfig.external_notification.enabled = true;
moduleConfig.external_notification.output = PIN_LED2; moduleConfig.external_notification.output = LED_NOTIFICATION;
#if defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3) moduleConfig.external_notification.active = LED_STATE_ON;
moduleConfig.external_notification.active = false;
#else
moduleConfig.external_notification.active = true;
#endif
moduleConfig.external_notification.alert_message = true; moduleConfig.external_notification.alert_message = true;
moduleConfig.external_notification.output_ms = 1000; moduleConfig.external_notification.output_ms = 1000;
moduleConfig.external_notification.nag_timeout = default_ringtone_nag_secs; moduleConfig.external_notification.nag_timeout = default_ringtone_nag_secs;
@@ -857,15 +851,6 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.external_notification.output_ms = 100; moduleConfig.external_notification.output_ms = 100;
moduleConfig.external_notification.active = true; moduleConfig.external_notification.active = true;
#endif #endif
#ifdef ELECROW_ThinkNode_M1
// Default to Elecrow USER_LED (blue)
moduleConfig.external_notification.enabled = true;
moduleConfig.external_notification.output = USER_LED;
moduleConfig.external_notification.active = true;
moduleConfig.external_notification.alert_message = true;
moduleConfig.external_notification.output_ms = 1000;
moduleConfig.external_notification.nag_timeout = 60;
#endif
#ifdef T_LORA_PAGER #ifdef T_LORA_PAGER
moduleConfig.canned_message.updown1_enabled = true; moduleConfig.canned_message.updown1_enabled = true;
moduleConfig.canned_message.inputbroker_pin_a = ROTARY_A; moduleConfig.canned_message.inputbroker_pin_a = ROTARY_A;

View File

@@ -27,7 +27,7 @@
#include "platform/portduino/USBHal.h" #include "platform/portduino/USBHal.h"
#endif #endif
#ifdef ARCH_STM32WL> #ifdef ARCH_STM32WL
#include "STM32WLE5JCInterface.h" #include "STM32WLE5JCInterface.h"
#endif #endif

View File

@@ -126,7 +126,7 @@ template <typename T> bool SX128xInterface<T>::reconfigure()
if (err != RADIOLIB_ERR_NONE) if (err != RADIOLIB_ERR_NONE)
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);
err = lora.setCodingRate(cr); err = lora.setCodingRate(cr, cr != 7); // use long interleaving except if CR is 4/7 which doesn't support it
if (err != RADIOLIB_ERR_NONE) if (err != RADIOLIB_ERR_NONE)
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);

View File

@@ -130,8 +130,7 @@ CannedMessageModule::CannedMessageModule()
: SinglePortModule("canned", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("CannedMessage") : SinglePortModule("canned", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("CannedMessage")
{ {
this->loadProtoForModule(); this->loadProtoForModule();
if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE && if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE) {
!CANNED_MESSAGE_MODULE_ENABLE) {
LOG_INFO("CannedMessageModule: No messages are configured. Module is disabled"); LOG_INFO("CannedMessageModule: No messages are configured. Module is disabled");
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED; this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
disable(); disable();

View File

@@ -27,10 +27,6 @@ enum CannedMessageModuleIconType { shift, backspace, space, enter };
#define CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT 50 #define CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT 50
#define CANNED_MESSAGE_MODULE_MESSAGES_SIZE 800 #define CANNED_MESSAGE_MODULE_MESSAGES_SIZE 800
#ifndef CANNED_MESSAGE_MODULE_ENABLE
#define CANNED_MESSAGE_MODULE_ENABLE 0
#endif
// ============================ // ============================
// Data Structures // Data Structures
// ============================ // ============================

View File

@@ -1,6 +1,7 @@
#include "configuration.h" #include "configuration.h"
#if !MESHTASTIC_EXCLUDE_INPUTBROKER #if !MESHTASTIC_EXCLUDE_INPUTBROKER
#include "buzz/BuzzerFeedbackThread.h" #include "buzz/BuzzerFeedbackThread.h"
#include "modules/StatusLEDModule.h"
#include "modules/SystemCommandsModule.h" #include "modules/SystemCommandsModule.h"
#endif #endif
#if !MESHTASTIC_EXCLUDE_PKI #if !MESHTASTIC_EXCLUDE_PKI
@@ -90,6 +91,9 @@
#include "modules/DropzoneModule.h" #include "modules/DropzoneModule.h"
#endif #endif
#if defined(HAS_HARDWARE_WATCHDOG)
#include "watchdog/watchdogThread.h"
#endif
/** /**
* Create module instances here. If you are adding a new module, you must 'new' it here (or somewhere else) * Create module instances here. If you are adding a new module, you must 'new' it here (or somewhere else)
*/ */
@@ -228,6 +232,9 @@ void setupModules()
#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS #if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS
if (moduleConfig.has_range_test && moduleConfig.range_test.enabled) if (moduleConfig.has_range_test && moduleConfig.range_test.enabled)
new RangeTestModule(); new RangeTestModule();
#endif
#if defined(HAS_HARDWARE_WATCHDOG)
watchdogThread = new WatchdogThread();
#endif #endif
// NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra // NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra
// acks // acks

View File

@@ -130,7 +130,6 @@ int32_t StatusLEDModule::runOnce()
#ifdef LED_CHARGE #ifdef LED_CHARGE
digitalWrite(LED_CHARGE, CHARGE_LED_state); digitalWrite(LED_CHARGE, CHARGE_LED_state);
#endif #endif
// digitalWrite(green_LED_PIN, LED_STATE_OFF);
#ifdef LED_PAIRING #ifdef LED_PAIRING
digitalWrite(LED_PAIRING, PAIRING_LED_state); digitalWrite(LED_PAIRING, PAIRING_LED_state);
#endif #endif

View File

@@ -26,7 +26,7 @@ bool RAK12035Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
sensor.get_sensor_version(&data); sensor.get_sensor_version(&data);
if (data != 0) { if (data != 0) {
LOG_INFO("Init sensor: %s", sensorName); LOG_INFO("Init sensor: %s", sensorName);
LOG_INFO("RAK12035Sensor Init Succeed \nSensor1 Firmware version: %i, Sensor Name: %s", data, sensorName); LOG_INFO("RAK12035Sensor Init Succeed \nSensor Firmware version: %i, Sensor Name: %s", data, sensorName);
status = true; status = true;
sensor.sensor_sleep(); sensor.sensor_sleep();
RESTORE_3V3_POWER(); RESTORE_3V3_POWER();
@@ -49,33 +49,39 @@ void RAK12035Sensor::setup()
// TODO:: Check for and run calibration check for up to 2 additional sensors if present. // TODO:: Check for and run calibration check for up to 2 additional sensors if present.
uint16_t zero_val = 0; uint16_t zero_val = 0;
uint16_t hundred_val = 0; uint16_t hundred_val = 0;
uint16_t default_zero_val = 550; const uint16_t default_zero_val = 510;
uint16_t default_hundred_val = 420; const uint16_t default_hundred_val = 390;
sensor.sensor_on(); sensor.sensor_on();
sensor.begin();
delay(200); delay(200);
sensor.get_dry_cal(&zero_val); sensor.get_dry_cal(&zero_val);
delay(200);
sensor.get_wet_cal(&hundred_val); sensor.get_wet_cal(&hundred_val);
delay(200); delay(200);
if (zero_val == 0 || zero_val <= hundred_val) {
LOG_INFO("Dry calibration value is %d", zero_val); bool calibrationReset = false;
LOG_INFO("Wet calibration value is %d", hundred_val);
LOG_INFO("This does not make sense. You can recalibrate this sensor using the calibration sketch included here: " if (zero_val == 0) {
"https://github.com/RAKWireless/RAK12035_SoilMoisture."); LOG_INFO("Dry calibration not set, using default: %d", default_zero_val);
LOG_INFO("For now, setting default calibration value for Dry Calibration: %d", default_zero_val);
sensor.set_dry_cal(default_zero_val); sensor.set_dry_cal(default_zero_val);
sensor.get_dry_cal(&zero_val); delay(200);
LOG_INFO("Dry calibration reset complete. New value is %d", zero_val); zero_val = default_zero_val;
calibrationReset = true;
} }
if (hundred_val == 0 || hundred_val >= zero_val) { if (hundred_val == 0 || hundred_val >= zero_val) {
LOG_INFO("Dry calibration value is %d", zero_val); LOG_INFO("Wet calibration not set, using default: %d", default_hundred_val);
LOG_INFO("Wet calibration value is %d", hundred_val);
LOG_INFO("This does not make sense. You can recalibrate this sensor using the calibration sketch included here: "
"https://github.com/RAKWireless/RAK12035_SoilMoisture.");
LOG_INFO("For now, setting default calibration value for Wet Calibration: %d", default_hundred_val);
sensor.set_wet_cal(default_hundred_val); sensor.set_wet_cal(default_hundred_val);
sensor.get_wet_cal(&hundred_val); delay(200);
LOG_INFO("Wet calibration reset complete. New value is %d", hundred_val); hundred_val = default_hundred_val;
calibrationReset = true;
} }
if (calibrationReset) {
LOG_INFO("Default calibration values applied. Consider running the calibration sketch for better accuracy: "
"https://github.com/RAKWireless/RAK12035_SoilMoisture");
}
LOG_INFO("Dry calibration value: %d, Wet calibration value: %d", zero_val, hundred_val);
sensor.sensor_sleep(); sensor.sensor_sleep();
RESTORE_3V3_POWER(); RESTORE_3V3_POWER();
delay(200); delay(200);

View File

@@ -241,7 +241,6 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false, bool skipSaveN
#ifdef PIN_POWER_EN #ifdef PIN_POWER_EN
digitalWrite(PIN_POWER_EN, LOW); digitalWrite(PIN_POWER_EN, LOW);
pinMode(PIN_POWER_EN, INPUT); // power off peripherals pinMode(PIN_POWER_EN, INPUT); // power off peripherals
// pinMode(PIN_POWER_EN1, INPUT_PULLDOWN);
#endif #endif
#ifdef RAK_WISMESH_TAP_V2 #ifdef RAK_WISMESH_TAP_V2

View File

@@ -0,0 +1,37 @@
#include "watchdogThread.h"
#include "configuration.h"
#ifdef HAS_HARDWARE_WATCHDOG
WatchdogThread *watchdogThread;
WatchdogThread::WatchdogThread() : OSThread("Watchdog")
{
setup();
}
void WatchdogThread::feedDog(void)
{
digitalWrite(HARDWARE_WATCHDOG_DONE, HIGH);
delay(1);
digitalWrite(HARDWARE_WATCHDOG_DONE, LOW);
}
int32_t WatchdogThread::runOnce()
{
LOG_DEBUG("Feeding hardware watchdog");
feedDog();
return HARDWARE_WATCHDOG_TIMEOUT_MS;
}
bool WatchdogThread::setup()
{
LOG_DEBUG("init hardware watchdog");
pinMode(HARDWARE_WATCHDOG_WAKE, INPUT);
pinMode(HARDWARE_WATCHDOG_DONE, OUTPUT);
delay(1);
digitalWrite(HARDWARE_WATCHDOG_DONE, LOW);
delay(1);
feedDog();
return true;
}
#endif

View File

@@ -0,0 +1,17 @@
#pragma once
#include "concurrency/OSThread.h"
#include <stdint.h>
#ifdef HAS_HARDWARE_WATCHDOG
class WatchdogThread : private concurrency::OSThread
{
public:
WatchdogThread();
void feedDog(void);
virtual bool setup();
virtual int32_t runOnce() override;
};
extern WatchdogThread *watchdogThread;
#endif

View File

@@ -8,6 +8,7 @@ build_flags =
-I variants/esp32/chatter2 -I variants/esp32/chatter2
-DMESHTASTIC_EXCLUDE_WEBSERVER=1 -DMESHTASTIC_EXCLUDE_WEBSERVER=1
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1 -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
-ULED_BUILTIN
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}

View File

@@ -98,7 +98,6 @@
#define KB_LOAD 21 // load values from the switch and store in shift register #define KB_LOAD 21 // load values from the switch and store in shift register
#define KB_CLK 22 // clock pin for serial data out #define KB_CLK 22 // clock pin for serial data out
#define KB_DATA 23 // data pin #define KB_DATA 23 // data pin
#define CANNED_MESSAGE_MODULE_ENABLE 1
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// // // //

View File

@@ -10,3 +10,6 @@ build_flags =
-D EBYTE_E22 -D EBYTE_E22
-D EBYTE_E22_900M30S ; Assume Tx power curve is identical to 900M30S as there is no documentation -D EBYTE_E22_900M30S ; Assume Tx power curve is identical to 900M30S as there is no documentation
-I variants/esp32/diy/9m2ibr_aprs_lora_tracker -I variants/esp32/diy/9m2ibr_aprs_lora_tracker
build_src_filter =
${esp32_base.build_src_filter}
+<../variants/esp32/diy/9m2ibr_aprs_lora_tracker>

View File

@@ -0,0 +1,8 @@
#include "variant.h"
#include "Arduino.h"
void earlyInitVariant()
{
pinMode(USER_LED, OUTPUT);
digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);
}

View File

@@ -14,3 +14,4 @@ build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D DIY_V1 -D DIY_V1
-I variants/esp32/diy/hydra -I variants/esp32/diy/hydra
-ULED_BUILTIN

View File

@@ -17,3 +17,4 @@ build_flags =
-D DIY_V1 -D DIY_V1
-D EBYTE_E22 -D EBYTE_E22
-I variants/esp32/diy/v1 -I variants/esp32/diy/v1
-ULED_BUILTIN

View File

@@ -30,7 +30,6 @@ build_flags =
-DTFT_BL=32 -DTFT_BL=32
-DSPI_FREQUENCY=40000000 -DSPI_FREQUENCY=40000000
-DSPI_READ_FREQUENCY=16000000 -DSPI_READ_FREQUENCY=16000000
-DDISABLE_ALL_LIBRARY_WARNINGS
lib_ignore = lib_ignore =
m5stack-core m5stack-core
lib_deps = lib_deps =

View File

@@ -14,3 +14,4 @@ build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D NANO_G1_EXPLORER -D NANO_G1_EXPLORER
-I variants/esp32/nano-g1-explorer -I variants/esp32/nano-g1-explorer
-ULED_BUILTIN

View File

@@ -14,3 +14,4 @@ build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D NANO_G1 -D NANO_G1
-I variants/esp32/nano-g1 -I variants/esp32/nano-g1
-ULED_BUILTIN

View File

@@ -9,6 +9,7 @@ build_flags =
-DHAS_STK8XXX=1 -DHAS_STK8XXX=1
-O2 -O2
-I variants/esp32/radiomaster_900_bandit -I variants/esp32/radiomaster_900_bandit
-ULED_BUILTIN
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool
lib_deps = lib_deps =

View File

@@ -13,5 +13,6 @@ build_flags =
-DCONFIG_DISABLE_HAL_LOCKS=1 -DCONFIG_DISABLE_HAL_LOCKS=1
-O2 -O2
-I variants/esp32/radiomaster_900_bandit_nano -I variants/esp32/radiomaster_900_bandit_nano
-ULED_BUILTIN
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool

View File

@@ -16,5 +16,6 @@ build_flags =
-DCONFIG_DISABLE_HAL_LOCKS=1 -DCONFIG_DISABLE_HAL_LOCKS=1
-O2 -O2
-I variants/esp32/radiomaster_900_bandit_nano -I variants/esp32/radiomaster_900_bandit_nano
-ULED_BUILTIN
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool

View File

@@ -14,3 +14,4 @@ build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D STATION_G1 -D STATION_G1
-I variants/esp32/station-g1 -I variants/esp32/station-g1
-ULED_BUILTIN

View File

@@ -57,7 +57,6 @@
#ifndef TOUCH_IRQ #ifndef TOUCH_IRQ
#define TOUCH_IRQ -1 #define TOUCH_IRQ -1
#endif #endif
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define USE_VIRTUAL_KEYBOARD 1 #define USE_VIRTUAL_KEYBOARD 1
#define ST7796_NSS 25 #define ST7796_NSS 25

View File

@@ -12,7 +12,7 @@ extends = esp32_base
board = ttgo-lora32-v21 board = ttgo-lora32-v21
board_check = true board_check = true
build_flags = build_flags =
${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/esp32/tlora_v2_1_16 ${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/esp32/tlora_v2_1_16 -ULED_BUILTIN
upload_speed = 115200 upload_speed = 115200
[env:sugarcube] [env:sugarcube]

View File

@@ -7,3 +7,4 @@ build_flags =
-I variants/esp32/tlora_v2_1_16 -I variants/esp32/tlora_v2_1_16
-D LORA_TCXO_GPIO=12 -D LORA_TCXO_GPIO=12
-D BUTTON_PIN=0 -D BUTTON_PIN=0
-ULED_BUILTIN

View File

@@ -10,7 +10,6 @@
#define LED_PIN 13 // 13 red, 2 blue, 15 red #define LED_PIN 13 // 13 red, 2 blue, 15 red
// #define HAS_BUTTON 0
#define BUTTON_PIN 0 #define BUTTON_PIN 0
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP

View File

@@ -16,22 +16,12 @@
#define SLEEP_TIME 120 #define SLEEP_TIME 120
#define GPS_DEFAULT_NOT_PRESENT 1 #define GPS_DEFAULT_NOT_PRESENT 1
// #define GPS_RX_PIN 44
// #define GPS_TX_PIN 43
// #define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
// ratio of voltage divider = 2.0 (RD2=100k, RD3=100k)
// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
// #define ADC_CHANNEL ADC1_GPIO4_CHANNEL
// keyboard // keyboard
#define I2C_SDA 47 // I2C pins for this board #define I2C_SDA 47 // I2C pins for this board
#define I2C_SCL 14 #define I2C_SCL 14
// #define KB_POWERON -1 // must be set to HIGH
// #define KB_SLAVE_ADDRESS TDECK_KB_ADDR // 0x55
// #define KB_BL_PIN 46 // not used for now // #define KB_BL_PIN 46 // not used for now
#define KB_INT 13 #define KB_INT 13
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define TFT_DC 39 #define TFT_DC 39
#define TFT_CS 41 #define TFT_CS 41
@@ -44,11 +34,9 @@
#define LORA_MOSI 3 #define LORA_MOSI 3
#define LORA_CS 17 #define LORA_CS 17
// #define LORA_DIO0 -1 // a No connect on the SX1262 module
#define LORA_RESET 18 #define LORA_RESET 18
#define LORA_DIO1 16 // SX1262 IRQ #define LORA_DIO1 16 // SX1262 IRQ
#define LORA_DIO2 15 // SX1262 BUSY #define LORA_DIO2 15 // SX1262 BUSY
// #define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
#define SX126X_CS LORA_CS #define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1 #define SX126X_DIO1 LORA_DIO1
@@ -58,4 +46,5 @@
#define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 #define SX126X_DIO3_TCXO_VOLTAGE 1.8
// #define LED_PIN 1 #define LED_NOTIFICATION 1
#define LED_STATE_ON 0

View File

@@ -6,4 +6,5 @@ board_build.partitions = default_8MB.csv
build_flags = build_flags =
${esp32s3_base.build_flags} -I variants/esp32s3/heltec_capsule_sensor_v3 ${esp32s3_base.build_flags} -I variants/esp32s3/heltec_capsule_sensor_v3
-D HELTEC_CAPSULE_SENSOR_V3 -D HELTEC_CAPSULE_SENSOR_V3
-ULED_BUILTIN
;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output

View File

@@ -7,6 +7,7 @@ build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-I variants/esp32s3/heltec_sensor_hub -I variants/esp32s3/heltec_sensor_hub
-D HELTEC_SENSOR_HUB -D HELTEC_SENSOR_HUB
-ULED_BUILTIN
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel

View File

@@ -17,3 +17,4 @@ build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-D HELTEC_WSL_V3 -D HELTEC_WSL_V3
-I variants/esp32s3/heltec_wsl_v3 -I variants/esp32s3/heltec_wsl_v3
-ULED_BUILTIN

View File

@@ -12,7 +12,7 @@
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
// Button A (44), B (43), R (12), U (13), L (11), D (18) // Button A (44), B (43), R (12), U (13), L (11), D (18)
#define BUTTON_PIN 44 // If defined, this will be used for user button presses #define BUTTON_PIN 43 // If defined, this will be used for user button presses
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define USE_RF95 #define USE_RF95
@@ -20,8 +20,19 @@
#define LORA_MISO 7 #define LORA_MISO 7
#define LORA_MOSI 8 #define LORA_MOSI 8
#define LORA_CS 9 #define LORA_CS 9
#define LORA_DIO0 16 // a No connect on the SX1262 module #define LORA_DIO0 16
#define LORA_RESET 4 #define LORA_RESET 4
#define LORA_DIO1 RADIOLIB_NC #define LORA_DIO1 RADIOLIB_NC
#define LORA_DIO2 RADIOLIB_NC #define LORA_DIO2 RADIOLIB_NC
// jk, its not really a trackball but we're gonna pretend!
#define HAS_TRACKBALL 1
#define TB_UP 13
#define TB_DOWN 18
#define TB_LEFT 11
#define TB_RIGHT 12
#define TB_PRESS 44 // BUTTON_PIN
#define TB_DIRECTION FALLING
#define ENABLE_AMBIENTLIGHTING

View File

@@ -52,8 +52,6 @@
// Picomputer gets a white on black display // Picomputer gets a white on black display
#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255) #define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define INPUTBROKER_MATRIX_TYPE 1 #define INPUTBROKER_MATRIX_TYPE 1
#define KEYS_COLS \ #define KEYS_COLS \

View File

@@ -22,9 +22,8 @@
#define LED_BLUE 45 #define LED_BLUE 45
#define PIN_LED1 LED_GREEN #define PIN_LED1 LED_GREEN
#define PIN_LED2 LED_BLUE #define LED_NOTIFICATION LED_BLUE
#define LED_CONN LED_BLUE
#define LED_PIN LED_GREEN #define LED_PIN LED_GREEN
#define ledOff(pin) pinMode(pin, INPUT) #define ledOff(pin) pinMode(pin, INPUT)

View File

@@ -30,9 +30,8 @@
#define LED_BLUE 45 #define LED_BLUE 45
#define PIN_LED1 LED_GREEN #define PIN_LED1 LED_GREEN
#define PIN_LED2 LED_BLUE #define LED_NOTIFICATION LED_BLUE
#define LED_CONN LED_BLUE
#define LED_PIN LED_GREEN #define LED_PIN LED_GREEN
#define ledOff(pin) pinMode(pin, INPUT) #define ledOff(pin) pinMode(pin, INPUT)
@@ -47,10 +46,8 @@
#define SPI_MISO (10) #define SPI_MISO (10)
#define SPI_CS (12) #define SPI_CS (12)
#define HAS_BUTTON 1
#define BUTTON_PIN 0 #define BUTTON_PIN 0
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define USE_VIRTUAL_KEYBOARD 1 #define USE_VIRTUAL_KEYBOARD 1
#define BATTERY_PIN 1 #define BATTERY_PIN 1

View File

@@ -43,7 +43,6 @@
// TCA8418 keyboard // TCA8418 keyboard
#define KB_BL_PIN 42 #define KB_BL_PIN 42
#define CANNED_MESSAGE_MODULE_ENABLE 1
// microphone PCM5102A // microphone PCM5102A
#define PCM5102A_SCK 47 #define PCM5102A_SCK 47

View File

@@ -61,7 +61,6 @@
#define KB_POWERON 10 // must be set to HIGH #define KB_POWERON 10 // must be set to HIGH
#define KB_SLAVE_ADDRESS TDECK_KB_ADDR // 0x55 #define KB_SLAVE_ADDRESS TDECK_KB_ADDR // 0x55
#define KB_BL_PIN 46 // not used for now #define KB_BL_PIN 46 // not used for now
#define CANNED_MESSAGE_MODULE_ENABLE 1
// trackball // trackball
#define HAS_TRACKBALL 1 #define HAS_TRACKBALL 1

View File

@@ -61,7 +61,6 @@
#define I2C_NO_RESCAN #define I2C_NO_RESCAN
#define KB_BL_PIN 46 #define KB_BL_PIN 46
#define KB_INT 6 #define KB_INT 6
#define CANNED_MESSAGE_MODULE_ENABLE 1
// audio codec ES8311 // audio codec ES8311
#define HAS_I2S #define HAS_I2S

View File

@@ -78,7 +78,6 @@
// keyboard changes // keyboard changes
#define PIN_BUZZER 43 #define PIN_BUZZER 43
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define INPUTBROKER_MATRIX_TYPE 1 #define INPUTBROKER_MATRIX_TYPE 1

View File

@@ -102,7 +102,6 @@
// keyboard changes // keyboard changes
#define PIN_BUZZER 43 #define PIN_BUZZER 43
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define INPUTBROKER_MATRIX_TYPE 1 #define INPUTBROKER_MATRIX_TYPE 1

View File

@@ -79,7 +79,6 @@
// keyboard changes // keyboard changes
#define PIN_BUZZER 43 #define PIN_BUZZER 43
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define INPUTBROKER_MATRIX_TYPE 1 #define INPUTBROKER_MATRIX_TYPE 1

View File

@@ -1,6 +1,5 @@
#define HAS_SCREEN 1 #define HAS_SCREEN 1
#define USE_TFTDISPLAY 1 #define USE_TFTDISPLAY 1
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define HAS_GPS 1 #define HAS_GPS 1
#define MAX_RX_TOPHONE portduino_config.maxtophone #define MAX_RX_TOPHONE portduino_config.maxtophone
#define MAX_NUM_NODES portduino_config.MaxNodes #define MAX_NUM_NODES portduino_config.MaxNodes

View File

@@ -2,7 +2,6 @@
#define HAS_SCREEN 1 #define HAS_SCREEN 1
#endif #endif
#define USE_TFTDISPLAY 1 #define USE_TFTDISPLAY 1
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define HAS_GPS 1 #define HAS_GPS 1
#define MAX_RX_TOPHONE portduino_config.maxtophone #define MAX_RX_TOPHONE portduino_config.maxtophone
#define MAX_NUM_NODES portduino_config.MaxNodes #define MAX_NUM_NODES portduino_config.MaxNodes

View File

@@ -50,8 +50,6 @@ extern "C" {
#define RGBLED_BLUE (0 + 12) // Blue of RGB P0.12 #define RGBLED_BLUE (0 + 12) // Blue of RGB P0.12
#define RGBLED_CA // comment out this line if you have a common cathode type, as defined use common anode logic #define RGBLED_CA // comment out this line if you have a common cathode type, as defined use common anode logic
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_BLUE PIN_LED2

View File

@@ -32,15 +32,8 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant() void initVariant()
{ {
// LED1 & LED2
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
pinMode(PIN_LED3, OUTPUT);
ledOff(PIN_LED3);
} }
void variant_shutdown() void variant_shutdown()

View File

@@ -41,21 +41,15 @@ extern "C" {
#define NUM_ANALOG_INPUTS (1) #define NUM_ANALOG_INPUTS (1)
#define NUM_ANALOG_OUTPUTS (0) #define NUM_ANALOG_OUTPUTS (0)
#define PIN_LED2 -1
#define PIN_LED3 -1
// LED // LED
#define PIN_LED1 (32 + 6) // red #define PIN_LED1 (32 + 6) // red
#define LED_POWER (32 + 4) #define LED_POWER (32 + 4)
#define USER_LED (0 + 13) // green #define LED_NOTIFICATION (0 + 13) // green
// USB_CHECK // USB_CHECK
#define EXT_PWR_DETECT (32 + 3) #define EXT_PWR_DETECT (32 + 3)
#define ADC_V (0 + 8) #define ADC_V (0 + 8)
#define LED_RED PIN_LED3
#define LED_BLUE PIN_LED1 #define LED_BLUE PIN_LED1
#define LED_GREEN PIN_LED2
#define LED_CONN PIN_GREEN
#define LED_STATE_ON 0 // State when LED is lit // LED灯亮时的状态 #define LED_STATE_ON 0 // State when LED is lit // LED灯亮时的状态
#define PIN_BUZZER (0 + 6) #define PIN_BUZZER (0 + 6)
/* /*
@@ -170,8 +164,6 @@ External serial flash WP25R1635FZUIL0
#define PIN_SPI_MOSI (0 + 22) #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 // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER

View File

@@ -37,8 +37,8 @@ void initVariant()
digitalWrite(KEY_POWER, HIGH); digitalWrite(KEY_POWER, HIGH);
pinMode(RGB_POWER, OUTPUT); pinMode(RGB_POWER, OUTPUT);
digitalWrite(RGB_POWER, HIGH); digitalWrite(RGB_POWER, HIGH);
pinMode(green_LED_PIN, OUTPUT); pinMode(LED_GREEN, OUTPUT);
digitalWrite(green_LED_PIN, LED_STATE_OFF); digitalWrite(LED_GREEN, LED_STATE_OFF);
pinMode(LED_BLUE, OUTPUT); pinMode(LED_BLUE, OUTPUT);
pinMode(PIN_POWER_USB, INPUT); pinMode(PIN_POWER_USB, INPUT);
pinMode(PIN_POWER_DONE, INPUT); pinMode(PIN_POWER_DONE, INPUT);
@@ -63,8 +63,8 @@ void initVariant()
// called from main-nrf52.cpp during the cpuDeepSleep() function // called from main-nrf52.cpp during the cpuDeepSleep() function
void variant_shutdown() void variant_shutdown()
{ {
digitalWrite(red_LED_PIN, HIGH); digitalWrite(LED_RED, HIGH);
digitalWrite(green_LED_PIN, HIGH); digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_BLUE, HIGH); digitalWrite(LED_BLUE, HIGH);
digitalWrite(PIN_EN1, LOW); digitalWrite(PIN_EN1, LOW);
@@ -81,8 +81,8 @@ void variant_shutdown()
if (pin == PIN_POWER_USB || pin == BUTTON_PIN || pin == PIN_EN1 || pin == PIN_EN2 || pin == DHT_POWER || if (pin == PIN_POWER_USB || pin == BUTTON_PIN || pin == PIN_EN1 || pin == PIN_EN2 || pin == DHT_POWER ||
pin == ACC_POWER || pin == Battery_POWER || pin == GPS_POWER || pin == LR1110_SPI_MISO_PIN || pin == ACC_POWER || pin == Battery_POWER || pin == GPS_POWER || pin == LR1110_SPI_MISO_PIN ||
pin == LR1110_SPI_MOSI_PIN || pin == LR1110_SPI_SCK_PIN || pin == LR1110_SPI_NSS_PIN || pin == LR1110_BUSY_PIN || pin == LR1110_SPI_MOSI_PIN || pin == LR1110_SPI_SCK_PIN || pin == LR1110_SPI_NSS_PIN || pin == LR1110_BUSY_PIN ||
pin == LR1110_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == green_LED_PIN || pin == LR1110_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == LED_GREEN ||
pin == red_LED_PIN || pin == LED_BLUE) { pin == LED_RED || pin == LED_BLUE) {
continue; continue;
} }
pinMode(pin, OUTPUT); pinMode(pin, OUTPUT);

View File

@@ -50,11 +50,11 @@ extern "C" {
#define EEPROM_POWER 7 #define EEPROM_POWER 7
// LED // LED
#define red_LED_PIN 33 #define LED_RED 33
#define LED_POWER red_LED_PIN #define LED_POWER LED_RED
#define LED_CHARGE LED_POWER // Signals the Status LED Module to handle this LED #define LED_CHARGE LED_POWER // Signals the Status LED Module to handle this LED
#define green_LED_PIN 35 #define LED_GREEN 35
#define PIN_LED2 green_LED_PIN #define LED_NOTIFICATION LED_GREEN
#define LED_BLUE 37 #define LED_BLUE 37
#define LED_PAIRING LED_BLUE // Signals the Status LED Module to handle this LED #define LED_PAIRING LED_BLUE // Signals the Status LED Module to handle this LED

View File

@@ -32,9 +32,6 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant() void initVariant()
{ {
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
pinMode(LED_PAIRING, OUTPUT); pinMode(LED_PAIRING, OUTPUT);
ledOff(LED_PAIRING); ledOff(LED_PAIRING);

View File

@@ -41,7 +41,7 @@ extern "C" {
// LEDs // LEDs
#define LED_BLUE -1 #define LED_BLUE -1
#define PIN_LED2 (32 + 9) #define LED_NOTIFICATION (32 + 9)
#define LED_PAIRING (13) #define LED_PAIRING (13)
#define Battery_LED_1 (15) #define Battery_LED_1 (15)

View File

@@ -43,7 +43,7 @@ extern "C" {
#define LED_BLUE -1 #define LED_BLUE -1
#define LED_CHARGE (12) #define LED_CHARGE (12)
#define LED_PAIRING (7) #define LED_PAIRING (7)
#define PIN_LED2 LED_PAIRING #define LED_NOTIFICATION LED_PAIRING
#define LED_STATE_ON HIGH #define LED_STATE_ON HIGH
#define LED_STATE_OFF LOW #define LED_STATE_OFF LOW

View File

@@ -32,7 +32,4 @@ void initVariant()
// LED1 & LED2 // LED1 & LED2
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
} }

View File

@@ -27,14 +27,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (32 + 10) // LED P1.15 #define PIN_LED1 (32 + 10) // LED P1.15
#define PIN_LED2 (-1) //
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 0 // State when LED is litted #define LED_STATE_ON 0 // State when LED is lit
/* /*
* Buttons * Buttons

View File

@@ -32,7 +32,4 @@ void initVariant()
// LED1 & LED2 // LED1 & LED2
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
} }

View File

@@ -27,14 +27,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (32 + 10) // LED P1.15 #define PIN_LED1 (32 + 10) // LED P1.15
#define PIN_LED2 (-1) //
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 0 // State when LED is litted #define LED_STATE_ON 0 // State when LED is lit
/* /*
* Buttons * Buttons

View File

@@ -34,8 +34,6 @@ extern "C" {
// #define PIN_LED1 (32 + 9) Green // #define PIN_LED1 (32 + 9) Green
// #define PIN_LED1 (0 + 12) Blue // #define PIN_LED1 (0 + 12) Blue
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_BLUE PIN_LED2

View File

@@ -52,8 +52,6 @@ extern "C" {
#define LED_BLUE PIN_LED1 #define LED_BLUE PIN_LED1
#define LED_CONN PIN_LED3
#define LED_STATE_ON 0 // State when LED is lit #define LED_STATE_ON 0 // State when LED is lit
/* /*

View File

@@ -36,7 +36,6 @@ extern "C" {
#define PIN_LED3 LED_RED #define PIN_LED3 LED_RED
#define PIN_LED PIN_LED1 #define PIN_LED PIN_LED1
#define LED_PWR (PINS_COUNT)
#define LED_STATE_ON 1 // State when LED is lit #define LED_STATE_ON 1 // State when LED is lit

View File

@@ -52,7 +52,7 @@ extern "C" {
#define LED_GREEN PIN_LED2 // Actually red #define LED_GREEN PIN_LED2 // Actually red
#define LED_BLUE PIN_LED1 #define LED_BLUE PIN_LED1
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is lit
#define BUTTON_PIN (32 + 2) // P1.02 7 #define BUTTON_PIN (32 + 2) // P1.02 7

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -46,12 +46,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -62,8 +60,6 @@ extern "C" {
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

View File

@@ -137,8 +137,6 @@ No longer populated on PCB
#define PIN_SPI1_MOSI PIN_EINK_MOSI #define PIN_SPI1_MOSI PIN_EINK_MOSI
#define PIN_SPI1_SCK PIN_EINK_SCLK #define PIN_SPI1_SCK PIN_EINK_SCLK
// #define PIN_PWR_EN (0 + 6)
// To debug via the segger JLINK console rather than the CDC-ACM serial device // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER

View File

@@ -192,8 +192,6 @@ No longer populated on PCB
#define PIN_SPI_MOSI (0 + 22) #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 // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER

View File

@@ -26,7 +26,6 @@ extern "C" {
#define LED_RED PIN_LED1 #define LED_RED PIN_LED1
#define LED_BLUE PIN_LED1 #define LED_BLUE PIN_LED1
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_CONN LED_BLUE
#define LED_STATE_ON 0 // State when LED is lit #define LED_STATE_ON 0 // State when LED is lit
/* /*
@@ -99,8 +98,6 @@ No longer populated on PCB
#define PIN_SPI_MOSI (0 + 5) #define PIN_SPI_MOSI (0 + 5)
#define PIN_SPI_SCK (0 + 4) #define PIN_SPI_SCK (0 + 4)
// #define PIN_PWR_EN (0 + 6)
// To debug via the segger JLINK console rather than the CDC-ACM serial device // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER

View File

@@ -39,15 +39,15 @@ extern "C" {
#define NUM_ANALOG_INPUTS (1) #define NUM_ANALOG_INPUTS (1)
#define NUM_ANALOG_OUTPUTS (0) #define NUM_ANALOG_OUTPUTS (0)
#define PIN_LED1 (0 + 4) // green (confirmed on 1.0 board) #define PIN_LED1 (32 + 15) // green (confirmed on 1.0 board)
#define LED_BLUE PIN_LED1 // fake for bluefruit library #define LED_BLUE PIN_LED1 // fake for bluefruit library
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#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 HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected // #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 // #define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
/* /*
* Buttons * Buttons
@@ -59,8 +59,8 @@ extern "C" {
/* /*
No longer populated on PCB No longer populated on PCB
*/ */
#define PIN_SERIAL2_RX (0 + 9) #define PIN_SERIAL2_RX (-1)
#define PIN_SERIAL2_TX (0 + 10) #define PIN_SERIAL2_TX (-1)
/* /*
* I2C * I2C
@@ -132,11 +132,15 @@ No longer populated on PCB
#define PIN_SPI_MOSI (0 + 22) #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 // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER
// Hardware watchdog
#define HAS_HARDWARE_WATCHDOG
#define HARDWARE_WATCHDOG_DONE (0 + 9)
#define HARDWARE_WATCHDOG_WAKE (0 + 10)
#define HARDWARE_WATCHDOG_TIMEOUT_MS (6 * 60 * 1000) // 6 minute watchdog
#define BQ4050_SDA_PIN (32 + 1) // I2C data line pin #define BQ4050_SDA_PIN (32 + 1) // I2C data line pin
#define BQ4050_SCL_PIN (32 + 0) // I2C clock line pin #define BQ4050_SCL_PIN (32 + 0) // I2C clock line pin
#define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin #define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin

View File

@@ -32,12 +32,12 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant() void initVariant()
{ {
// LED1 & LED2 // LED1 & LED_BLUE
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT); pinMode(LED_BLUE, OUTPUT);
ledOff(PIN_LED2); ledOff(LED_BLUE);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);

View File

@@ -47,12 +47,9 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -65,8 +62,6 @@ extern "C" {
#define INPUTDRIVER_ENCODER_BTN 28 #define INPUTDRIVER_ENCODER_BTN 28
#define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 150 #define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 150
#define CANNED_MESSAGE_MODULE_ENABLE 1
/* /*
* Buzzer - PWM * Buzzer - PWM
*/ */

View File

@@ -35,7 +35,4 @@ void initVariant()
// LED1 & LED2 // LED1 & LED2
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
} }

View File

@@ -50,12 +50,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) // Connected to WWAN host LED (if present) #define LED_BLUE (36) // Connected to WWAN host LED (if present)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -66,8 +64,6 @@ extern "C" {
// #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion // #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

View File

@@ -63,8 +63,8 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
digitalWrite(PIN_LED1, HIGH); digitalWrite(PIN_LED1, HIGH);
pinMode(PIN_LED2, OUTPUT); pinMode(LED_BLUE, OUTPUT);
digitalWrite(PIN_LED2, HIGH); digitalWrite(LED_BLUE, HIGH);
// Initialize LoRa pins // Initialize LoRa pins
pinMode(SX126X_RESET, OUTPUT); pinMode(SX126X_RESET, OUTPUT);

View File

@@ -43,9 +43,9 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (32 + 3) // P1.03, Green #define PIN_LED1 (32 + 3) // P1.03, Green
#define PIN_LED2 (32 + 4) // P1.04, Blue #define LED_BLUE (32 + 4) // P1.04, Blue
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 0 // State when LED is lit #define LED_STATE_ON 0 // State when LED is lit
// Buttons // Buttons

View File

@@ -41,17 +41,6 @@ extern "C" {
#define NUM_ANALOG_INPUTS (1) #define NUM_ANALOG_INPUTS (1)
#define NUM_ANALOG_OUTPUTS (0) #define NUM_ANALOG_OUTPUTS (0)
// LEDs
#define PIN_LED1 (-1)
#define PIN_LED2 (-1)
#define PIN_LED3 (-1)
#define LED_RED PIN_LED3
#define LED_BLUE PIN_LED1
#define LED_GREEN PIN_LED2
#define LED_CONN PIN_GREEN
#define LED_STATE_ON 0 // State when LED is lit #define LED_STATE_ON 0 // State when LED is lit
/* /*
@@ -152,8 +141,6 @@ External serial flash W25Q16JV_IQ
#define PIN_SPI_MOSI (0 + 11) #define PIN_SPI_MOSI (0 + 11)
#define PIN_SPI_SCK (0 + 12) #define PIN_SPI_SCK (0 + 12)
// #define PIN_PWR_EN (0 + 6)
// To debug via the segger JLINK console rather than the CDC-ACM serial device // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER

View File

@@ -7,7 +7,7 @@ extends = arduino_base
platform_packages = platform_packages =
; our custom Git version until they merge our PR ; our custom Git version until they merge our PR
# TODO renovate # TODO renovate
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#c770c8a16a351b55b86e347a3d9d7b74ad0bbf39 platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#74096746e5f167a2ff22e483d8e79bb1aef00591
; Don't renovate toolchain-gccarmnoneeabi ; Don't renovate toolchain-gccarmnoneeabi
platformio/toolchain-gccarmnoneeabi@~1.90301.0 platformio/toolchain-gccarmnoneeabi@~1.90301.0

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
// pinMode(PIN_3V3_EN, OUTPUT); // pinMode(PIN_3V3_EN, OUTPUT);
// digitalWrite(PIN_3V3_EN, HIGH); // digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -45,12 +45,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (32 + 4) // P1.04 Controls Green LED #define PIN_LED1 (32 + 4) // P1.04 Controls Green LED
#define PIN_LED2 (28) // P0.28 Controls Blue LED #define LED_BLUE (28) // P0.28 Controls Blue LED
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -46,12 +46,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -62,8 +60,6 @@ extern "C" {
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -45,12 +45,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -45,12 +45,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -61,8 +59,6 @@ extern "C" {
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -45,12 +45,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -61,8 +59,6 @@ extern "C" {
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -27,12 +27,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -45,12 +45,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -61,8 +59,6 @@ extern "C" {
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

View File

@@ -36,9 +36,6 @@ void initVariant()
pinMode(PIN_LED1, OUTPUT); pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1); ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
// 3V3 Power Rail // 3V3 Power Rail
pinMode(PIN_3V3_EN, OUTPUT); pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);

View File

@@ -45,12 +45,10 @@ extern "C" {
// LEDs // LEDs
#define PIN_LED1 (35) #define PIN_LED1 (35)
#define PIN_LED2 (36) #define LED_BLUE (36)
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2 #define LED_NOTIFICATION LED_BLUE
#define LED_STATE_ON 1 // State when LED is litted #define LED_STATE_ON 1 // State when LED is litted
@@ -61,8 +59,6 @@ extern "C" {
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define PIN_BUTTON2 12 #define PIN_BUTTON2 12
#define PIN_BUTTON3 24
#define PIN_BUTTON4 25
/* /*
* Analog pins * Analog pins

Some files were not shown because too many files have changed in this diff Show More