mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-30 22:50:57 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8582885bd | ||
|
|
974ae821d7 | ||
|
|
4ba7dc21bb | ||
|
|
c3e7c7843e | ||
|
|
ccdecbeae2 | ||
|
|
03cd38929e | ||
|
|
a5797aceaa |
@@ -17,6 +17,3 @@ lib_ignore =
|
|||||||
${esp32_base.lib_ignore}
|
${esp32_base.lib_ignore}
|
||||||
NimBLE-Arduino
|
NimBLE-Arduino
|
||||||
libpax
|
libpax
|
||||||
|
|
||||||
lib_deps = ${esp32_base.lib_deps}
|
|
||||||
tanakamasayuki/EspUsbHost@^1.0.2
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@ extends = esp32_base
|
|||||||
custom_esp32_kind = esp32s3
|
custom_esp32_kind = esp32s3
|
||||||
|
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
lib_deps = ${esp32_base.lib_deps}
|
|
||||||
tanakamasayuki/EspUsbHost@^1.0.2
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ build_flags =
|
|||||||
-Isrc/platform/portduino
|
-Isrc/platform/portduino
|
||||||
-DRADIOLIB_EEPROM_UNSUPPORTED
|
-DRADIOLIB_EEPROM_UNSUPPORTED
|
||||||
-DPORTDUINO_LINUX_HARDWARE
|
-DPORTDUINO_LINUX_HARDWARE
|
||||||
|
-DNXP_WIRE=Wire
|
||||||
-DHAS_UDP_MULTICAST
|
-DHAS_UDP_MULTICAST
|
||||||
-lpthread
|
-lpthread
|
||||||
-lstdc++fs
|
-lstdc++fs
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ lib_deps =
|
|||||||
nanopb/Nanopb@0.4.91
|
nanopb/Nanopb@0.4.91
|
||||||
# renovate: datasource=custom.pio depName=ErriezCRC32 packageName=erriez/library/ErriezCRC32
|
# renovate: datasource=custom.pio depName=ErriezCRC32 packageName=erriez/library/ErriezCRC32
|
||||||
erriez/ErriezCRC32@1.0.1
|
erriez/ErriezCRC32@1.0.1
|
||||||
|
https://github.com/meshtastic/SE05X#031f8feccae62689ebbd06914b44bd88547535af
|
||||||
|
|
||||||
|
|
||||||
; Used for the code analysis in PIO Home / Inspect
|
; Used for the code analysis in PIO Home / Inspect
|
||||||
check_tool = cppcheck
|
check_tool = cppcheck
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "ScanI2CTwoWire.h"
|
#include "ScanI2CTwoWire.h"
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_I2C
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
|
|
||||||
#include "concurrency/LockGuard.h"
|
#include "concurrency/LockGuard.h"
|
||||||
|
#include <SE05X.h>
|
||||||
#if defined(ARCH_PORTDUINO)
|
#if defined(ARCH_PORTDUINO)
|
||||||
#include "linux/LinuxHardwareI2C.h"
|
#include "linux/LinuxHardwareI2C.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -507,6 +507,10 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
|
|||||||
if (len == 5 && memcmp(expectedInfo, info, len) == 0) {
|
if (len == 5 && memcmp(expectedInfo, info, len) == 0) {
|
||||||
LOG_INFO("NXP SE050 crypto chip found");
|
LOG_INFO("NXP SE050 crypto chip found");
|
||||||
type = NXP_SE050;
|
type = NXP_SE050;
|
||||||
|
if (SE05X.begin()) {
|
||||||
|
LOG_INFO("NXP Random %u", SE05X.random(65535));
|
||||||
|
LOG_INFO("NXP Serial Number: %s", SE05X.serialNumber().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("FT6336U touchscreen found");
|
LOG_INFO("FT6336U touchscreen found");
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
#include "kbUsbBase.h"
|
|
||||||
#include "configuration.h"
|
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
|
|
||||||
KbUsbBase::KbUsbBase(const char *name) : concurrency::OSThread(name)
|
|
||||||
{
|
|
||||||
this->_originName = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t KbUsbBase::runOnce()
|
|
||||||
{
|
|
||||||
if (firstTime) {
|
|
||||||
// This is the first time the OSThread library has called this function, so init the USB HID routines
|
|
||||||
begin();
|
|
||||||
firstTime = 0;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
task();
|
|
||||||
}
|
|
||||||
return 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KbUsbBase::onKeyboardKey(uint8_t ascii, uint8_t keycode, uint8_t modifier)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (ascii != 0) {
|
|
||||||
LOG_DEBUG("Key 0x%x Code 0x%x Mod 0x%x pressed\n", ascii, keycode, modifier);
|
|
||||||
// reset shift now that we have a keypress
|
|
||||||
InputEvent e;
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
||||||
e.source = this->_originName;
|
|
||||||
switch (ascii) {
|
|
||||||
case 0x1b: // ESC
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL;
|
|
||||||
break;
|
|
||||||
case 0x08: // Back
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK;
|
|
||||||
e.kbchar = ascii;
|
|
||||||
break;
|
|
||||||
case 0xb5: // Up
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP;
|
|
||||||
break;
|
|
||||||
case 0xb6: // Down
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN;
|
|
||||||
break;
|
|
||||||
case 0xb4: // Left
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT;
|
|
||||||
e.kbchar = ascii;
|
|
||||||
break;
|
|
||||||
case 0xb7: // Right
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT;
|
|
||||||
e.kbchar = ascii;
|
|
||||||
break;
|
|
||||||
case 0x0d: // Enter
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT;
|
|
||||||
break;
|
|
||||||
case 0x00: // nopress
|
|
||||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
||||||
break;
|
|
||||||
default: // all other keys
|
|
||||||
e.inputEvent = ANYKEY;
|
|
||||||
e.kbchar = ascii;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (e.inputEvent != meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE) {
|
|
||||||
this->notifyObservers(&e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "InputBroker.h"
|
|
||||||
#include "concurrency/OSThread.h"
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
#include "EspUsbHost.h"
|
|
||||||
|
|
||||||
class KbUsbBase : public Observable<const InputEvent *>, public concurrency::OSThread, public EspUsbHost
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit KbUsbBase(const char *name);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual int32_t runOnce() override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
void onKeyboardKey(uint8_t ascii, uint8_t keycode, uint8_t modifier);
|
|
||||||
const char *_originName;
|
|
||||||
bool firstTime = 1;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#include "kbUsbImpl.h"
|
|
||||||
#include "InputBroker.h"
|
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
|
|
||||||
KbUsbImpl *kbUsbImpl;
|
|
||||||
|
|
||||||
KbUsbImpl::KbUsbImpl() : KbUsbBase("usbKB") {}
|
|
||||||
|
|
||||||
void KbUsbImpl::init()
|
|
||||||
{
|
|
||||||
inputBroker->registerSource(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // INPUTBROKER_MATRIX_TYPE
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include "kbUsbBase.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief The idea behind this class to have static methods for the event handlers.
|
|
||||||
* Check attachInterrupt() at RotaryEncoderInteruptBase.cpp
|
|
||||||
* Technically you can have as many rotary encoders hardver attached
|
|
||||||
* to your device as you wish, but you always need to have separate event
|
|
||||||
* handlers, thus you need to have a RotaryEncoderInterrupt implementation.
|
|
||||||
*/
|
|
||||||
class KbUsbImpl : public KbUsbBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
KbUsbImpl();
|
|
||||||
void init();
|
|
||||||
};
|
|
||||||
|
|
||||||
extern KbUsbImpl *kbUsbImpl;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
#include "input/cardKbI2cImpl.h"
|
#include "input/cardKbI2cImpl.h"
|
||||||
#endif
|
#endif
|
||||||
#include "input/kbMatrixImpl.h"
|
#include "input/kbMatrixImpl.h"
|
||||||
#include "input/kbUsbImpl.h"
|
|
||||||
#endif
|
#endif
|
||||||
#if !MESHTASTIC_EXCLUDE_PKI
|
#if !MESHTASTIC_EXCLUDE_PKI
|
||||||
#include "KeyVerificationModule.h"
|
#include "KeyVerificationModule.h"
|
||||||
@@ -182,14 +181,10 @@ void setupModules()
|
|||||||
kbMatrixImpl = new KbMatrixImpl();
|
kbMatrixImpl = new KbMatrixImpl();
|
||||||
kbMatrixImpl->init();
|
kbMatrixImpl->init();
|
||||||
#endif // INPUTBROKER_MATRIX_TYPE
|
#endif // INPUTBROKER_MATRIX_TYPE
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
kbUsbImpl = new KbUsbImpl();
|
|
||||||
kbUsbImpl->init();
|
|
||||||
#endif
|
|
||||||
#ifdef INPUTBROKER_SERIAL_TYPE
|
#ifdef INPUTBROKER_SERIAL_TYPE
|
||||||
aSerialKeyboardImpl = new SerialKeyboardImpl();
|
aSerialKeyboardImpl = new SerialKeyboardImpl();
|
||||||
aSerialKeyboardImpl->init();
|
aSerialKeyboardImpl->init();
|
||||||
#endif // INPUTBROKER_SERIAL_TYPE
|
#endif // INPUTBROKER_MATRIX_TYPE
|
||||||
}
|
}
|
||||||
#endif // HAS_BUTTON
|
#endif // HAS_BUTTON
|
||||||
#if ARCH_PORTDUINO
|
#if ARCH_PORTDUINO
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ board_level = extra
|
|||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
;upload_port = /dev/ttyACM2
|
;upload_port = /dev/ttyACM2
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32s3_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
caveman99/ESP32 Codec2@^1.0.1
|
caveman99/ESP32 Codec2@^1.0.1
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32s3_base.build_flags} -D PRIVATE_HW -I variants/bpi_picow_esp32_s3
|
${esp32_base.build_flags} -D PRIVATE_HW -I variants/bpi_picow_esp32_s3
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
extends = esp32c3_base
|
extends = esp32c3_base
|
||||||
board = esp32-c3-devkitm-1
|
board = esp32-c3-devkitm-1
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32c3_base.build_flags}
|
${esp32_base.build_flags}
|
||||||
-D HELTEC_HT62
|
-D HELTEC_HT62
|
||||||
-I variants/heltec_esp32c3
|
-I variants/heltec_esp32c3
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ extends = esp32c3_base
|
|||||||
board = esp32-c3-devkitm-1
|
board = esp32-c3-devkitm-1
|
||||||
board_level = extra
|
board_level = extra
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32c3_base.build_flags}
|
${esp32_base.build_flags}
|
||||||
-D PRIVATE_HW
|
-D PRIVATE_HW
|
||||||
-I variants/m5stack-stamp-c3
|
-I variants/m5stack-stamp-c3
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ upload_speed = 921600
|
|||||||
platform_packages =
|
platform_packages =
|
||||||
platformio/tool-esptoolpy@^1.40801.0
|
platformio/tool-esptoolpy@^1.40801.0
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32s3_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
zinggjm/GxEPD2@^1.6.2
|
zinggjm/GxEPD2@^1.6.2
|
||||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||||
build_unflags =
|
build_unflags =
|
||||||
${esp32s3_base.build_unflags}
|
${esp32s3_base.build_unflags}
|
||||||
-DARDUINO_USB_MODE=1
|
-DARDUINO_USB_MODE=1
|
||||||
build_flags =
|
build_flags =
|
||||||
;${esp32s3_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_eink
|
;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_eink
|
||||||
${esp32s3_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_eink
|
${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_eink
|
||||||
-Dmy
|
-Dmy
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_290_T5D
|
-DEINK_DISPLAY_MODEL=GxEPD2_290_T5D
|
||||||
-DEINK_WIDTH=296
|
-DEINK_WIDTH=296
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ upload_speed = 921600
|
|||||||
platform_packages =
|
platform_packages =
|
||||||
platformio/tool-esptoolpy@^1.40801.0
|
platformio/tool-esptoolpy@^1.40801.0
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32s3_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||||
build_unflags =
|
build_unflags =
|
||||||
${esp32s3_base.build_unflags}
|
${esp32s3_base.build_unflags}
|
||||||
-DARDUINO_USB_MODE=1
|
-DARDUINO_USB_MODE=1
|
||||||
build_flags =
|
build_flags =
|
||||||
;${esp32s3_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled
|
;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled
|
||||||
${esp32s3_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled
|
${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled
|
||||||
-DBOARD_HAS_PSRAM
|
-DBOARD_HAS_PSRAM
|
||||||
-mfix-esp32-psram-cache-issue
|
-mfix-esp32-psram-cache-issue
|
||||||
-DARDUINO_USB_MODE=0
|
-DARDUINO_USB_MODE=0
|
||||||
@@ -11,6 +11,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631
|
|||||||
-DRADIOLIB_EXCLUDE_SX128X=1
|
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-DNXP_WIRE=Wire
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ board_check = true
|
|||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32s3_base.build_flags} -D TLORA_T3S3_V1 -I variants/tlora_t3s3_v1
|
${esp32_base.build_flags} -D TLORA_T3S3_V1 -I variants/tlora_t3s3_v1
|
||||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||||
Reference in New Issue
Block a user