Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SE05X library #5693

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions arch/portduino/portduino.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated).
[portduino_base]
platform = https://github.com/meshtastic/platform-native.git#562d189828f09fbf4c4093b3c0104bae9d8e9ff9
platform = https://github.com/meshtastic/platform-native.git#6aeb5e6d3d01ad87494ac9a76bc16efe7650c2e1
framework = arduino

build_src_filter =
Expand All @@ -26,14 +26,15 @@ lib_deps =
${radiolib_base.lib_deps}
rweather/Crypto@^0.4.0
https://github.com/lovyan03/LovyanGFX.git#1401c28a47646fe00538d487adcb2eb3c72de805
https://github.com/pine64/libch341-spi-userspace#a9b17e3452f7fb747000d9b4ad4409155b39f6ef
https://github.com/pine64/libch341-spi-userspace#8695637adeabf5abf5601d8e82cb0ba19ce9ec46

build_flags =
${arduino_base.build_flags}
-fPIC
-Isrc/platform/portduino
-DRADIOLIB_EEPROM_UNSUPPORTED
-DPORTDUINO_LINUX_HARDWARE
-DNXP_WIRE=Wire
-lpthread
-lstdc++fs
-lbluetooth
Expand Down
2 changes: 2 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ lib_deps =
https://github.com/meshtastic/ArduinoThread.git#1ae8778c85d0a2a729f989e0b1e7d7c4dc84eef0
nanopb/[email protected]
erriez/[email protected]
https://github.com/meshtastic/SE05X#031f8feccae62689ebbd06914b44bd88547535af


; Used for the code analysis in PIO Home / Inspect
check_tool = cppcheck
Expand Down
8 changes: 6 additions & 2 deletions src/detect/ScanI2CTwoWire.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "ScanI2CTwoWire.h"

#if !MESHTASTIC_EXCLUDE_I2C

#include "concurrency/LockGuard.h"
#include <SE05X.h>
#if defined(ARCH_PORTDUINO)
#include "linux/LinuxHardwareI2C.h"
#endif
Expand Down Expand Up @@ -460,6 +460,10 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
if (len == 5 && memcmp(expectedInfo, info, len) == 0) {
LOG_INFO("NXP SE050 crypto chip found");
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 {
LOG_INFO("FT6336U touchscreen found");
Expand Down Expand Up @@ -510,4 +514,4 @@ void ScanI2CTwoWire::logFoundDevice(const char *device, uint8_t address)
{
LOG_INFO("%s found at address 0x%x", device, address);
}
#endif
#endif
1 change: 1 addition & 0 deletions variants/rak4631/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631
-DRADIOLIB_EXCLUDE_SX128X=1
-DRADIOLIB_EXCLUDE_SX127X=1
-DRADIOLIB_EXCLUDE_LR11X0=1
-DNXP_WIRE=Wire
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/>
lib_deps =
${nrf52840_base.lib_deps}
Expand Down
Loading