Compare commits

..

4 Commits

Author SHA1 Message Date
Jonathan Bennett
a0e2b06970 Merge branch 'develop' into agc-reset 2026-01-28 16:17:28 -06:00
Jonathan Bennett
bc702b18d8 Merge branch 'develop' into agc-reset 2025-12-17 19:54:07 -06:00
Jonathan Bennett
5e2d8eac6a Merge branch 'develop' into agc-reset 2025-10-14 09:04:28 -05:00
Jonathan Bennett
971543fab3 Add agc reset attempt 2025-09-29 12:11:48 -05:00
162 changed files with 486 additions and 459 deletions

1
.envrc
View File

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

3
.gitignore vendored
View File

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

44
flake.lock generated
View File

@@ -1,44 +0,0 @@
{
"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
}

View File

@@ -1,66 +0,0 @@
{
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
'';
};
}
);
};
}

View File

@@ -56,7 +56,6 @@ build_flags = -Wno-missing-field-initializers
-DMESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE=1
-DMESHTASTIC_EXCLUDE_POWERMON=1
-D MAX_THREADS=40 ; As we've split modules, we have more threads to manage
-DLED_BUILTIN=-1
#-DBUILD_EPOCH=$UNIX_TIME ; set in platformio-custom.py now
#-D OLED_PL=1
#-D DEBUG_HEAP=1 ; uncomment to add free heap space / memory leak debugging logs

View File

@@ -1,12 +0,0 @@
(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,9 +816,6 @@ void Power::shutdown()
#endif
#ifdef PIN_LED3
ledOff(PIN_LED3);
#endif
#ifdef LED_NOTIFICATION
ledOff(LED_NOTIFICATION);
#endif
doDeepSleep(DELAY_FOREVER, true, true);
#elif defined(ARCH_PORTDUINO)

View File

@@ -428,16 +428,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define HAS_RGB_LED
#endif
#ifndef LED_STATE_OFF
#define LED_STATE_OFF 0
#endif
#ifndef LED_STATE_ON
#define LED_STATE_ON 1
#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
#if defined(PIN_BUTTON2) && !defined(CANCEL_BUTTON_PIN)

View File

@@ -5,6 +5,7 @@
SerialKeyboard *globalSerialKeyboard = nullptr;
#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
// 3 SHIFT level (lower case, upper case, numbers), up to 4 repeated presses, button number

View File

@@ -193,6 +193,8 @@ bool kb_found = false;
// global bool to record that on-screen keyboard (OSK) is present
bool osk_found = false;
unsigned long last_listen = 0;
// The I2C address of the RTC Module (if found)
ScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE;
// The I2C address of the Accelerometer (if found)
@@ -354,9 +356,9 @@ void setup()
digitalWrite(LED_POWER, LED_STATE_ON);
#endif
#ifdef LED_NOTIFICATION
pinMode(LED_NOTIFICATION, OUTPUT);
digitalWrite(LED_NOTIFICATION, HIGH ^ LED_STATE_ON);
#ifdef USER_LED
pinMode(USER_LED, OUTPUT);
digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);
#endif
#ifdef WIFI_LED
@@ -1168,6 +1170,13 @@ void loop()
#endif
power->powerCommandsCheck();
if (last_listen + 1000 * 60 < millis() &&
!(RadioLibInterface::instance->isSending() || RadioLibInterface::instance->isActivelyReceiving())) {
RadioLibInterface::instance->startReceive();
LOG_DEBUG("attempting AGC reset");
last_listen = millis();
}
#ifdef DEBUG_STACK
static uint32_t lastPrint = 0;
if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) {

View File

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

View File

@@ -824,10 +824,16 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.external_notification.output_ms = 500;
moduleConfig.external_notification.nag_timeout = 2;
#endif
#if defined(LED_NOTIFICATION)
#if defined(RAK4630) || defined(RAK11310) || defined(RAK3312) || defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3) || \
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.output = LED_NOTIFICATION;
moduleConfig.external_notification.active = LED_STATE_ON;
moduleConfig.external_notification.output = PIN_LED2;
#if defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3)
moduleConfig.external_notification.active = false;
#else
moduleConfig.external_notification.active = true;
#endif
moduleConfig.external_notification.alert_message = true;
moduleConfig.external_notification.output_ms = 1000;
moduleConfig.external_notification.nag_timeout = default_ringtone_nag_secs;
@@ -851,6 +857,15 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.external_notification.output_ms = 100;
moduleConfig.external_notification.active = true;
#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
moduleConfig.canned_message.updown1_enabled = true;
moduleConfig.canned_message.inputbroker_pin_a = ROTARY_A;

View File

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

View File

@@ -620,19 +620,15 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p)
!(p->pki_encrypted != true && (strcasecmp(channels.getName(chIndex), Channels::serialChannel) == 0 ||
strcasecmp(channels.getName(chIndex), Channels::gpioChannel) == 0)) &&
// Check for valid keys and single node destination
config.security.private_key.size == 32 && !isBroadcast(p->to) &&
config.security.private_key.size == 32 && !isBroadcast(p->to) && node != nullptr &&
// Check for a known public key for the destination
(node->user.public_key.size == 32) &&
// Some portnums either make no sense to send with PKC
p->decoded.portnum != meshtastic_PortNum_TRACEROUTE_APP && p->decoded.portnum != meshtastic_PortNum_NODEINFO_APP &&
p->decoded.portnum != meshtastic_PortNum_ROUTING_APP && p->decoded.portnum != meshtastic_PortNum_POSITION_APP) {
LOG_DEBUG("Use PKI!");
if (numbytes + MESHTASTIC_HEADER_LENGTH + MESHTASTIC_PKC_OVERHEAD > MAX_LORA_PAYLOAD_LEN)
return meshtastic_Routing_Error_TOO_LARGE;
// Check for a known public key for the destination
if (node == nullptr || node->user.public_key.size != 32) {
LOG_WARN("Unknown public key for destination node 0x%08x (portnum %d), refusing to send legacy DM", p->to,
p->decoded.portnum);
return meshtastic_Routing_Error_PKI_SEND_FAIL_PUBLIC_KEY;
}
if (p->pki_encrypted && !memfll(p->public_key.bytes, 0, 32) &&
memcmp(p->public_key.bytes, node->user.public_key.bytes, 32) != 0) {
LOG_WARN("Client public key differs from requested: 0x%02x, stored key begins 0x%02x", *p->public_key.bytes,

View File

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

View File

@@ -130,7 +130,8 @@ CannedMessageModule::CannedMessageModule()
: SinglePortModule("canned", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("CannedMessage")
{
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");
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
disable();

View File

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

View File

@@ -1,7 +1,6 @@
#include "configuration.h"
#if !MESHTASTIC_EXCLUDE_INPUTBROKER
#include "buzz/BuzzerFeedbackThread.h"
#include "modules/StatusLEDModule.h"
#include "modules/SystemCommandsModule.h"
#endif
#if !MESHTASTIC_EXCLUDE_PKI
@@ -91,9 +90,6 @@
#include "modules/DropzoneModule.h"
#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)
*/
@@ -232,9 +228,6 @@ void setupModules()
#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS
if (moduleConfig.has_range_test && moduleConfig.range_test.enabled)
new RangeTestModule();
#endif
#if defined(HAS_HARDWARE_WATCHDOG)
watchdogThread = new WatchdogThread();
#endif
// NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra
// acks

View File

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

View File

@@ -529,46 +529,37 @@ bool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPac
bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m)
{
bool valid = false;
bool valid = true;
bool hasSensor = false;
// getMetrics() doesn't always get evaluated because of
// short-circuit evaluation rules in c++
bool get_metrics;
m->time = getTime();
m->which_variant = meshtastic_Telemetry_environment_metrics_tag;
m->variant.environment_metrics = meshtastic_EnvironmentMetrics_init_zero;
for (TelemetrySensor *sensor : sensors) {
get_metrics = sensor->getMetrics(m); // avoid short-circuit evaluation rules
valid = valid || get_metrics;
valid = valid && sensor->getMetrics(m);
hasSensor = true;
}
#ifndef T1000X_SENSOR_EN
if (ina219Sensor.hasSensor()) {
get_metrics = ina219Sensor.getMetrics(m);
valid = valid || get_metrics;
valid = valid && ina219Sensor.getMetrics(m);
hasSensor = true;
}
if (ina260Sensor.hasSensor()) {
get_metrics = ina260Sensor.getMetrics(m);
valid = valid || get_metrics;
valid = valid && ina260Sensor.getMetrics(m);
hasSensor = true;
}
if (ina3221Sensor.hasSensor()) {
get_metrics = ina3221Sensor.getMetrics(m);
valid = valid || get_metrics;
valid = valid && ina3221Sensor.getMetrics(m);
hasSensor = true;
}
if (max17048Sensor.hasSensor()) {
get_metrics = max17048Sensor.getMetrics(m);
valid = valid || get_metrics;
valid = valid && max17048Sensor.getMetrics(m);
hasSensor = true;
}
#endif
#ifdef HAS_RAKPROT
get_metrics = rak9154Sensor.getMetrics(m);
valid = valid || get_metrics;
valid = valid && rak9154Sensor.getMetrics(m);
hasSensor = true;
#endif
return valid && hasSensor;

View File

@@ -168,21 +168,18 @@ bool HealthTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &
bool HealthTelemetryModule::getHealthTelemetry(meshtastic_Telemetry *m)
{
bool valid = false;
bool valid = true;
bool hasSensor = false;
bool get_metrics;
m->time = getTime();
m->which_variant = meshtastic_Telemetry_health_metrics_tag;
m->variant.health_metrics = meshtastic_HealthMetrics_init_zero;
if (max30102Sensor.hasSensor()) {
get_metrics = max30102Sensor.getMetrics(m);
valid = valid || get_metrics; // avoid short-circuit evaluation rules
valid = valid && max30102Sensor.getMetrics(m);
hasSensor = true;
}
if (mlx90614Sensor.hasSensor()) {
get_metrics = mlx90614Sensor.getMetrics(m);
valid = valid || get_metrics;
valid = valid && mlx90614Sensor.getMetrics(m);
hasSensor = true;
}

View File

@@ -26,7 +26,7 @@ bool RAK12035Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
sensor.get_sensor_version(&data);
if (data != 0) {
LOG_INFO("Init sensor: %s", sensorName);
LOG_INFO("RAK12035Sensor Init Succeed \nSensor Firmware version: %i, Sensor Name: %s", data, sensorName);
LOG_INFO("RAK12035Sensor Init Succeed \nSensor1 Firmware version: %i, Sensor Name: %s", data, sensorName);
status = true;
sensor.sensor_sleep();
RESTORE_3V3_POWER();
@@ -49,39 +49,33 @@ void RAK12035Sensor::setup()
// TODO:: Check for and run calibration check for up to 2 additional sensors if present.
uint16_t zero_val = 0;
uint16_t hundred_val = 0;
const uint16_t default_zero_val = 510;
const uint16_t default_hundred_val = 390;
uint16_t default_zero_val = 550;
uint16_t default_hundred_val = 420;
sensor.sensor_on();
sensor.begin();
delay(200);
sensor.get_dry_cal(&zero_val);
delay(200);
sensor.get_wet_cal(&hundred_val);
delay(200);
bool calibrationReset = false;
if (zero_val == 0) {
LOG_INFO("Dry calibration not set, using default: %d", default_zero_val);
if (zero_val == 0 || zero_val <= hundred_val) {
LOG_INFO("Dry calibration value is %d", zero_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 Dry Calibration: %d", default_zero_val);
sensor.set_dry_cal(default_zero_val);
delay(200);
zero_val = default_zero_val;
calibrationReset = true;
sensor.get_dry_cal(&zero_val);
LOG_INFO("Dry calibration reset complete. New value is %d", zero_val);
}
if (hundred_val == 0 || hundred_val >= zero_val) {
LOG_INFO("Wet calibration not set, using default: %d", default_hundred_val);
LOG_INFO("Dry calibration value is %d", zero_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);
delay(200);
hundred_val = default_hundred_val;
calibrationReset = true;
sensor.get_wet_cal(&hundred_val);
LOG_INFO("Wet calibration reset complete. New value is %d", hundred_val);
}
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();
RESTORE_3V3_POWER();
delay(200);

View File

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

View File

@@ -1,37 +0,0 @@
#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

@@ -1,17 +0,0 @@
#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,7 +8,6 @@ build_flags =
-I variants/esp32/chatter2
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
-ULED_BUILTIN
lib_deps =
${esp32_base.lib_deps}

View File

@@ -98,6 +98,7 @@
#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_DATA 23 // data pin
#define CANNED_MESSAGE_MODULE_ENABLE 1
/////////////////////////////////////////////////////////////////////////////////
// //

View File

@@ -10,6 +10,3 @@ build_flags =
-D EBYTE_E22
-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
build_src_filter =
${esp32_base.build_src_filter}
+<../variants/esp32/diy/9m2ibr_aprs_lora_tracker>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,6 +6,8 @@
#define LED_GREEN 12
#define LED_BLUE 2
#define LED_BUILTIN LED_GREEN
static const uint8_t TX = 1;
static const uint8_t RX = 3;

View File

@@ -6,6 +6,8 @@
#define LED_GREEN 12
#define LED_BLUE 2
#define LED_BUILTIN LED_GREEN
static const uint8_t TX = 1;
static const uint8_t RX = 3;

View File

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

View File

@@ -18,7 +18,6 @@ build_flags = ${esp32_base.build_flags}
-I variants/esp32/tbeam
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-ULED_BUILTIN
upload_speed = 921600
[env:tbeam-displayshield]

View File

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

View File

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

View File

@@ -6,5 +6,4 @@ build_flags =
-D TLORA_V2_1_16
-I variants/esp32/tlora_v2_1_16
-D LORA_TCXO_GPIO=12
-D BUTTON_PIN=0
-ULED_BUILTIN
-D BUTTON_PIN=0

View File

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

View File

@@ -8,4 +8,3 @@ build_flags =
-I variants/esp32c6/tlora_c6
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
-ULED_BUILTIN

View File

@@ -16,12 +16,22 @@
#define SLEEP_TIME 120
#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
#define I2C_SDA 47 // I2C pins for this board
#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_INT 13
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define TFT_DC 39
#define TFT_CS 41
@@ -34,9 +44,11 @@
#define LORA_MOSI 3
#define LORA_CS 17
// #define LORA_DIO0 -1 // a No connect on the SX1262 module
#define LORA_RESET 18
#define LORA_DIO1 16 // SX1262 IRQ
#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_DIO1 LORA_DIO1
@@ -46,5 +58,4 @@
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define LED_NOTIFICATION 1
#define LED_STATE_ON 0
// #define LED_PIN 1

View File

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

View File

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

View File

@@ -18,4 +18,3 @@ build_flags =
${esp32s3_base.build_flags}
-D HELTEC_V3
-I variants/esp32s3/heltec_v3
-ULED_BUILTIN

View File

@@ -6,6 +6,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 35;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -3,6 +3,10 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = 45; // LED is not populated on earliest board variant
#define BUILTIN_LED LED_BUILTIN // Backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -3,6 +3,10 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = 45; // LED is not populated on earliest board variant
#define BUILTIN_LED LED_BUILTIN // Backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -3,6 +3,10 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = 35;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -3,6 +3,10 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -3,6 +3,10 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
static const uint8_t TX = 43;

View File

@@ -11,6 +11,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -11,6 +11,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

@@ -10,6 +10,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

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

View File

@@ -10,7 +10,10 @@
// Some boards have too low voltage on this pin (board design bug)
// Use different pin with 3V and connect with 48
// and change this setup for the chosen pin (for example 38)
#define RGB_BUILTIN SOC_GPIO_PIN_COUNT + 48
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64
static const uint8_t TX = 43;

View File

@@ -49,6 +49,10 @@ static const uint8_t T14 = 14;
static const uint8_t VBAT_SENSE = 2;
static const uint8_t VBUS_SENSE = 34;
// User LED
#define LED_BUILTIN 13
#define BUILTIN_LED LED_BUILTIN // backward compatibility
static const uint8_t RGB_DATA = 40;
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
#define RGB_BUILTIN (RGB_DATA + SOC_GPIO_PIN_COUNT)

View File

@@ -12,7 +12,7 @@
#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)
#define BUTTON_PIN 43 // If defined, this will be used for user button presses
#define BUTTON_PIN 44 // If defined, this will be used for user button presses
#define BUTTON_NEED_PULLUP
#define USE_RF95
@@ -20,19 +20,8 @@
#define LORA_MISO 7
#define LORA_MOSI 8
#define LORA_CS 9
#define LORA_DIO0 16
#define LORA_DIO0 16 // a No connect on the SX1262 module
#define LORA_RESET 4
#define LORA_DIO1 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
#define LORA_DIO2 RADIOLIB_NC

View File

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

View File

@@ -24,6 +24,9 @@ static const uint8_t SCK = 13;
#define SPI_MISO (10)
#define SPI_CS (12)
// LEDs
#define LED_BUILTIN LED_GREEN
#ifdef _VARIANT_RAK3112_
/*
* Serial interfaces

View File

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

View File

@@ -22,4 +22,7 @@ static const uint8_t SCK = 13;
#define SPI_MISO (10)
#define SPI_CS (12)
// LEDs
#define LED_BUILTIN LED_GREEN
#endif /* Pins_Arduino_h */

View File

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

View File

@@ -3,6 +3,8 @@
#include <stdint.h>
// static const uint8_t LED_BUILTIN = -1;
// static const uint8_t TX = 43;
// static const uint8_t RX = 44;

View File

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

View File

@@ -6,6 +6,8 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
// static const uint8_t LED_BUILTIN = -1;
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

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

View File

@@ -3,6 +3,8 @@
#include <stdint.h>
// static const uint8_t LED_BUILTIN = -1;
// static const uint8_t TX = 43;
// static const uint8_t RX = 44;

View File

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

View File

@@ -11,6 +11,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

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

View File

@@ -11,6 +11,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

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

View File

@@ -11,6 +11,10 @@
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

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

View File

@@ -6,6 +6,9 @@
#define USB_VID 0x16D0
#define USB_PID 0x1178
#define LED_BUILTIN 13
#define BUILTIN_LED LED_BUILTIN // backward compatibility
static const uint8_t TX = 43;
static const uint8_t RX = 44;

View File

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

View File

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

View File

@@ -50,6 +50,9 @@ extern "C" {
#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 LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2

View File

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

View File

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

View File

@@ -37,8 +37,8 @@ void initVariant()
digitalWrite(KEY_POWER, HIGH);
pinMode(RGB_POWER, OUTPUT);
digitalWrite(RGB_POWER, HIGH);
pinMode(LED_GREEN, OUTPUT);
digitalWrite(LED_GREEN, LED_STATE_OFF);
pinMode(green_LED_PIN, OUTPUT);
digitalWrite(green_LED_PIN, LED_STATE_OFF);
pinMode(LED_BLUE, OUTPUT);
pinMode(PIN_POWER_USB, INPUT);
pinMode(PIN_POWER_DONE, INPUT);
@@ -63,8 +63,8 @@ void initVariant()
// called from main-nrf52.cpp during the cpuDeepSleep() function
void variant_shutdown()
{
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_GREEN, HIGH);
digitalWrite(red_LED_PIN, HIGH);
digitalWrite(green_LED_PIN, HIGH);
digitalWrite(LED_BLUE, HIGH);
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 ||
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_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == LED_GREEN ||
pin == LED_RED || pin == LED_BLUE) {
pin == LR1110_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == green_LED_PIN ||
pin == red_LED_PIN || pin == LED_BLUE) {
continue;
}
pinMode(pin, OUTPUT);

View File

@@ -50,14 +50,15 @@ extern "C" {
#define EEPROM_POWER 7
// LED
#define LED_RED 33
#define LED_POWER LED_RED
#define red_LED_PIN 33
#define LED_POWER red_LED_PIN
#define LED_CHARGE LED_POWER // Signals the Status LED Module to handle this LED
#define LED_GREEN 35
#define LED_NOTIFICATION LED_GREEN
#define green_LED_PIN 35
#define PIN_LED2 green_LED_PIN
#define LED_BLUE 37
#define LED_PAIRING LED_BLUE // Signals the Status LED Module to handle this LED
#define LED_BUILTIN -1
#define LED_STATE_ON LOW
#define LED_STATE_OFF HIGH

View File

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

View File

@@ -40,8 +40,9 @@ extern "C" {
#define NUM_ANALOG_OUTPUTS (0)
// LEDs
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_NOTIFICATION (32 + 9)
#define PIN_LED2 (32 + 9)
#define LED_PAIRING (13)
#define Battery_LED_1 (15)

View File

@@ -40,10 +40,11 @@ extern "C" {
#define NUM_ANALOG_OUTPUTS (0)
// LEDs
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_CHARGE (12)
#define LED_PAIRING (7)
#define LED_NOTIFICATION LED_PAIRING
#define PIN_LED2 LED_PAIRING
#define LED_STATE_ON HIGH
#define LED_STATE_OFF LOW

View File

@@ -51,6 +51,7 @@ extern "C" {
#define PIN_LED1 (32 + 7) // P1.07 Blue D2
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit

View File

@@ -51,6 +51,7 @@ extern "C" {
#define PIN_LED1 (32 + 7) // P1.07 Blue D2
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit

View File

@@ -51,6 +51,7 @@ extern "C" {
#define PIN_LED1 (-1)
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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