mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-31 06:02:02 +00:00
Compare commits
10 Commits
no-outgoin
...
mini-epape
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db59ff3b9a | ||
|
|
b18742c211 | ||
|
|
03084f6d3b | ||
|
|
94d7b71aa8 | ||
|
|
d44ceb6eb2 | ||
|
|
1643dfddc1 | ||
|
|
89729496e8 | ||
|
|
33dc1ea3ec | ||
|
|
282121311b | ||
|
|
f4771ddbf6 |
3
.github/workflows/models_pr_triage.yml
vendored
3
.github/workflows/models_pr_triage.yml
vendored
@@ -88,9 +88,10 @@ jobs:
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Step 3: Auto-label PR type (bugfix/hardware-support/enhancement)
|
||||
# Only skip for spam/ai-generated; still classify needs-review PRs
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
- name: Classify PR for labeling
|
||||
if: steps.check-labels.outputs.skip_all != 'true' && steps.check-labels.outputs.has_type_label != 'true' && (steps.quality.outputs.response == 'ok' || steps.quality.outputs.response == '')
|
||||
if: steps.check-labels.outputs.skip_all != 'true' && steps.check-labels.outputs.has_type_label != 'true' && steps.quality.outputs.response != 'spam' && steps.quality.outputs.response != 'ai-generated'
|
||||
uses: actions/ai-inference@v2
|
||||
id: classify
|
||||
continue-on-error: true
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -50,6 +50,3 @@ idf_component.yml
|
||||
CMakeLists.txt
|
||||
/sdkconfig.*
|
||||
.dummy/*
|
||||
|
||||
# PYTHONPATH used by the Nix shell
|
||||
.python3
|
||||
|
||||
40
boards/mini-epaper-s3.json
Normal file
40
boards/mini-epaper-s3.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"partitions": "default.csv"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"-DBOARD_HAS_PSRAM",
|
||||
"-DARDUINO_ESP32S3_DEV",
|
||||
"-DARDUINO_USB_MODE=1",
|
||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||
"-DARDUINO_RUNNING_CORE=1",
|
||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"hwids": [["0x303A", "0x1001"]],
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3"
|
||||
},
|
||||
"connectivity": ["wifi"],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": ["esp-builtin"],
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": ["arduino", "espidf"],
|
||||
"name": "LilyGo Mini-Epapaer-S3 (4 MB Flash, 2MB PSRAM)",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://www.lilygo.cc",
|
||||
"vendor": "LilyGo"
|
||||
}
|
||||
44
flake.lock
generated
44
flake.lock
generated
@@ -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
|
||||
}
|
||||
66
flake.nix
66
flake.nix
@@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
12
shell.nix
12
shell.nix
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -259,6 +259,18 @@ bool EInkDisplay::connect()
|
||||
adafruitDisplay->setRotation(3);
|
||||
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
||||
}
|
||||
#elif defined(MINI_EPAPER_S3)
|
||||
spi1 = new SPIClass(HSPI);
|
||||
spi1->begin(PIN_SPI1_SCK, PIN_SPI1_MISO, PIN_SPI1_MOSI, PIN_EINK_CS);
|
||||
|
||||
// Create GxEPD2 objects
|
||||
auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);
|
||||
adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);
|
||||
|
||||
// Init GxEPD2
|
||||
adafruitDisplay->init();
|
||||
adafruitDisplay->setRotation(0);
|
||||
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
||||
#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)
|
||||
|
||||
// Detect display model, before starting SPI
|
||||
|
||||
@@ -93,7 +93,8 @@ class EInkDisplay : public OLEDDisplay
|
||||
SPIClass *hspi = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK)
|
||||
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) || \
|
||||
defined(MINI_EPAPER_S3)
|
||||
SPIClass *spi1 = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -354,9 +354,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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "platform/portduino/USBHal.h"
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_STM32WL
|
||||
#ifdef ARCH_STM32WL>
|
||||
#include "STM32WLE5JCInterface.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
// ============================
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -686,6 +686,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
|
||||
#ifdef NIMBLE_TWO
|
||||
if (ble->isDeInit)
|
||||
return;
|
||||
#else
|
||||
if (nimbleBluetooth && nimbleBluetooth->isDeInit)
|
||||
return;
|
||||
#endif
|
||||
|
||||
meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
|
||||
@@ -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>
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "variant.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
void earlyInitVariant()
|
||||
{
|
||||
pinMode(USER_LED, OUTPUT);
|
||||
digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);
|
||||
}
|
||||
@@ -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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
26
variants/esp32s3/mini-epaper-s3/pins_arduino.h
Normal file
26
variants/esp32s3/mini-epaper-s3/pins_arduino.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SDA = 18;
|
||||
static const uint8_t SCL = 9;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = -1;
|
||||
static const uint8_t MOSI = 17;
|
||||
static const uint8_t MISO = 6;
|
||||
static const uint8_t SCK = 8;
|
||||
|
||||
#define SPI_MOSI (39)
|
||||
#define SPI_SCK (41)
|
||||
#define SPI_MISO (38)
|
||||
#define SPI_CS (40)
|
||||
|
||||
#define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
41
variants/esp32s3/mini-epaper-s3/platformio.ini
Normal file
41
variants/esp32s3/mini-epaper-s3/platformio.ini
Normal file
@@ -0,0 +1,41 @@
|
||||
[env:mini-epaper-s3]
|
||||
;custom_meshtastic_hw_model =
|
||||
custom_meshtastic_hw_model_slug = MINI_EPAPER_S3
|
||||
custom_meshtastic_architecture = esp32-s3
|
||||
custom_meshtastic_actively_supported = true
|
||||
custom_meshtastic_support_level = 1
|
||||
custom_meshtastic_display_name = LILYGO Mini ePaper S3 E-Ink
|
||||
custom_meshtastic_images = mini-epaper-s3.svg
|
||||
custom_meshtastic_tags = LilyGo
|
||||
custom_meshtastic_requires_dfu = no
|
||||
|
||||
extends = esp32s3_base
|
||||
board = mini-epaper-s3
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/mini-epaper-s3
|
||||
-DMINI_EPAPER_S3
|
||||
-DPRIVATE_HW ; TODO
|
||||
-DUSE_EINK
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_102
|
||||
-DEINK_WIDTH=80
|
||||
-DEINK_HEIGHT=128
|
||||
; -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
; -DEINK_LIMIT_FASTREFRESH=0 ; How many consecutive fast-refreshes are permitted //20
|
||||
; -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates //30
|
||||
; -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
||||
; -DEINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
|
||||
; -DEINK_LIMIT_GHOSTING_PX=1500 ; (Optional) How much image ghosting is tolerated
|
||||
; -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||
zinggjm/GxEPD2@1.6.5
|
||||
;# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
|
||||
;https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||
lewisxhe/SensorLib@0.3.3
|
||||
56
variants/esp32s3/mini-epaper-s3/variant.h
Normal file
56
variants/esp32s3/mini-epaper-s3/variant.h
Normal file
@@ -0,0 +1,56 @@
|
||||
// Display (E-Ink)
|
||||
|
||||
#define PIN_EINK_CS 13
|
||||
#define PIN_EINK_BUSY 10
|
||||
#define PIN_EINK_RES 11
|
||||
#define PIN_EINK_SCLK 14
|
||||
#define PIN_EINK_MOSI 15
|
||||
#define PIN_EINK_DC 12
|
||||
#define PIN_EINK_EN 42
|
||||
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define PIN_SPI1_MISO -1
|
||||
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
||||
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
||||
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
#define BATTERY_PIN 2 // A battery voltage measurement pin, voltage divider connected here to
|
||||
// measure battery voltage ratio of voltage divider = 2.0 (assumption)
|
||||
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||
#define ADC_CHANNEL ADC1_GPIO2_CHANNEL
|
||||
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
#define BUTTON_PIN 3
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define ALT_BUTTON_PIN 4
|
||||
#define ALT_BUTTON_ACTIVE_LOW true
|
||||
#define ALT_BUTTON_ACTIVE_PULLUP true
|
||||
#define PIN_BUTTON3 0
|
||||
|
||||
// #define HAS_SDCARD 1
|
||||
// #define SDCARD_USE_SOFT_SPI
|
||||
|
||||
// PCF85063 RTC Module
|
||||
#define PCF85063_RTC 0x51
|
||||
#define HAS_RTC 1
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_DIO1 5
|
||||
#define LORA_SCK 8
|
||||
#define LORA_MISO 6
|
||||
#define LORA_MOSI 17
|
||||
#define LORA_CS 7 // CS not connected; IO7 is free
|
||||
#define LORA_RESET 21
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 5
|
||||
#define SX126X_BUSY 16
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
@@ -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
|
||||
@@ -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 \
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
// TCA8418 keyboard
|
||||
#define KB_BL_PIN 42
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
// microphone PCM5102A
|
||||
#define PCM5102A_SCK 47
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
// keyboard changes
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
// keyboard changes
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
// keyboard changes
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,7 +29,7 @@ lib_deps =
|
||||
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
|
||||
lovyan03/LovyanGFX@1.2.19
|
||||
# renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/pine64/libch341-spi-userspace gitBranch=main
|
||||
https://github.com/pine64/libch341-spi-userspace/archive/23c42319a69cffcb65868e3c72e6bed83974a393.zip
|
||||
https://github.com/pine64/libch341-spi-userspace/archive/af9bc27c9c30fa90772279925b7c5913dff789b4.zip
|
||||
# renovate: datasource=custom.pio depName=adafruit/Adafruit seesaw Library packageName=adafruit/library/Adafruit seesaw Library
|
||||
adafruit/Adafruit seesaw Library@1.7.9
|
||||
# renovate: datasource=git-refs depName=RAK12034-BMX160 packageName=https://github.com/RAKWireless/RAK12034-BMX160 gitBranch=main
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -50,6 +50,8 @@ 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_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -41,15 +41,21 @@ 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_CONN PIN_GREEN
|
||||
#define LED_STATE_ON 0 // State when LED is lit // LED灯亮时的状态
|
||||
#define PIN_BUZZER (0 + 6)
|
||||
/*
|
||||
@@ -164,6 +170,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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -50,11 +50,11 @@ 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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define LED_BLUE -1
|
||||
#define LED_NOTIFICATION (32 + 9)
|
||||
#define PIN_LED2 (32 + 9)
|
||||
#define LED_PAIRING (13)
|
||||
|
||||
#define Battery_LED_1 (15)
|
||||
|
||||
@@ -43,7 +43,7 @@ extern "C" {
|
||||
#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
|
||||
|
||||
@@ -32,4 +32,7 @@ void initVariant()
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,14 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 10) // LED P1.15
|
||||
#define PIN_LED2 (-1) //
|
||||
|
||||
#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
|
||||
|
||||
@@ -32,4 +32,7 @@ void initVariant()
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,14 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 10) // LED P1.15
|
||||
#define PIN_LED2 (-1) //
|
||||
|
||||
#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
|
||||
|
||||
@@ -34,6 +34,8 @@ extern "C" {
|
||||
// #define PIN_LED1 (32 + 9) Green
|
||||
// #define PIN_LED1 (0 + 12) Blue
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ extern "C" {
|
||||
|
||||
#define LED_BLUE PIN_LED1
|
||||
|
||||
#define LED_CONN PIN_LED3
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
/*
|
||||
|
||||
@@ -36,6 +36,7 @@ extern "C" {
|
||||
#define PIN_LED3 LED_RED
|
||||
|
||||
#define PIN_LED PIN_LED1
|
||||
#define LED_PWR (PINS_COUNT)
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ extern "C" {
|
||||
#define LED_GREEN PIN_LED2 // Actually red
|
||||
#define LED_BLUE PIN_LED1
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
#define BUTTON_PIN (32 + 2) // P1.02 7
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -46,10 +46,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -60,6 +62,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -137,6 +137,8 @@ No longer populated on PCB
|
||||
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
||||
#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
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -192,6 +192,8 @@ No longer populated on PCB
|
||||
#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
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ extern "C" {
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED1
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_CONN LED_BLUE
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
/*
|
||||
@@ -98,6 +99,8 @@ No longer populated on PCB
|
||||
#define PIN_SPI_MOSI (0 + 5)
|
||||
#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
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@ No longer populated on PCB
|
||||
#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
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED_BLUE
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(LED_BLUE, OUTPUT);
|
||||
ledOff(LED_BLUE);
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
|
||||
@@ -47,9 +47,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -62,6 +65,8 @@ extern "C" {
|
||||
#define INPUTDRIVER_ENCODER_BTN 28
|
||||
#define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 150
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
/*
|
||||
* Buzzer - PWM
|
||||
*/
|
||||
|
||||
@@ -35,4 +35,7 @@ void initVariant()
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36) // Connected to WWAN host LED (if present)
|
||||
#define PIN_LED2 (36) // Connected to WWAN host LED (if present)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -64,6 +66,8 @@ extern "C" {
|
||||
// #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -63,8 +63,8 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
digitalWrite(PIN_LED1, HIGH);
|
||||
|
||||
pinMode(LED_BLUE, OUTPUT);
|
||||
digitalWrite(LED_BLUE, HIGH);
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
digitalWrite(PIN_LED2, HIGH);
|
||||
|
||||
// Initialize LoRa pins
|
||||
pinMode(SX126X_RESET, OUTPUT);
|
||||
|
||||
@@ -43,9 +43,9 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 3) // P1.03, Green
|
||||
#define LED_BLUE (32 + 4) // P1.04, Blue
|
||||
#define PIN_LED2 (32 + 4) // P1.04, Blue
|
||||
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
// Buttons
|
||||
|
||||
@@ -41,6 +41,17 @@ extern "C" {
|
||||
#define NUM_ANALOG_INPUTS (1)
|
||||
#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
|
||||
|
||||
/*
|
||||
@@ -141,6 +152,8 @@ External serial flash W25Q16JV_IQ
|
||||
#define PIN_SPI_MOSI (0 + 11)
|
||||
#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
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ extends = arduino_base
|
||||
platform_packages =
|
||||
; our custom Git version until they merge our PR
|
||||
# TODO renovate
|
||||
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#74096746e5f167a2ff22e483d8e79bb1aef00591
|
||||
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#c770c8a16a351b55b86e347a3d9d7b74ad0bbf39
|
||||
; Don't renovate toolchain-gccarmnoneeabi
|
||||
platformio/toolchain-gccarmnoneeabi@~1.90301.0
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
// pinMode(PIN_3V3_EN, OUTPUT);
|
||||
// digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 4) // P1.04 Controls Green LED
|
||||
#define LED_BLUE (28) // P0.28 Controls Blue LED
|
||||
#define PIN_LED2 (28) // P0.28 Controls Blue LED
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -46,10 +46,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -60,6 +62,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -27,10 +27,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion such as the RAK14014 or RAK14015 TFT modules
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
@@ -278,6 +282,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
|
||||
#define RAK14014 // Tell it we have a RAK14014
|
||||
#define USER_SETUP_LOADED 1
|
||||
#define DISABLE_ALL_LIBRARY_WARNINGS 1
|
||||
#define ST7789_DRIVER 1
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 320
|
||||
@@ -305,6 +310,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 120
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define USE_VIRTUAL_KEYBOARD 1
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
#define PIN_LED1 (12) // LED P1.15
|
||||
#define PIN_LED2 (11) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
// #define LED_PIN PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// Button Configuration
|
||||
|
||||
@@ -23,9 +23,12 @@
|
||||
#define PIN_LED1 (11) // LED P1.15
|
||||
#define PIN_LED2 (12) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
// #define LED_PIN PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// Button Configuration
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -154,6 +157,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
// joystick
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define CANNED_MESSAGE_ADD_CONFIRMATION 1
|
||||
|
||||
// trackball
|
||||
|
||||
@@ -23,9 +23,12 @@
|
||||
#define PIN_LED1 (11) // LED P1.15
|
||||
#define PIN_LED2 (12) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
// #define LED_PIN PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// Button Configuration
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -173,6 +176,7 @@ static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
#define TB_PRESS 29
|
||||
#define TB_DIRECTION FALLING
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define CANNED_MESSAGE_ADD_CONFIRMATION 1
|
||||
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user