* added companion radio targets for T3S3 board
This commit is contained in:
@@ -64,7 +64,7 @@
|
|||||||
#include <helpers/CustomSX1262Wrapper.h>
|
#include <helpers/CustomSX1262Wrapper.h>
|
||||||
#include <helpers/CustomSX1268Wrapper.h>
|
#include <helpers/CustomSX1268Wrapper.h>
|
||||||
static XiaoC3Board board;
|
static XiaoC3Board board;
|
||||||
#elif defined(SEEED_XIAO_S3)
|
#elif defined(SEEED_XIAO_S3) || defined(LILYGO_T3S3)
|
||||||
#include <helpers/ESP32Board.h>
|
#include <helpers/ESP32Board.h>
|
||||||
#include <helpers/CustomSX1262Wrapper.h>
|
#include <helpers/CustomSX1262Wrapper.h>
|
||||||
static ESP32Board board;
|
static ESP32Board board;
|
||||||
|
|||||||
@@ -297,6 +297,35 @@ lib_deps =
|
|||||||
adafruit/RTClib @ ^2.1.3
|
adafruit/RTClib @ ^2.1.3
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|
||||||
|
[env:LilyGo_T3S3_sx1262_companion_radio_usb]
|
||||||
|
extends = LilyGo_T3S3_sx1262
|
||||||
|
build_flags =
|
||||||
|
${LilyGo_T3S3_sx1262.build_flags}
|
||||||
|
-D MAX_CONTACTS=100
|
||||||
|
-D MAX_GROUP_CHANNELS=1
|
||||||
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
; -D MESH_DEBUG=1
|
||||||
|
build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} +<../examples/companion_radio/main.cpp>
|
||||||
|
lib_deps =
|
||||||
|
${LilyGo_T3S3_sx1262.lib_deps}
|
||||||
|
adafruit/RTClib @ ^2.1.3
|
||||||
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|
||||||
|
[env:LilyGo_T3S3_sx1262_companion_radio_ble]
|
||||||
|
extends = LilyGo_T3S3_sx1262
|
||||||
|
build_flags =
|
||||||
|
${LilyGo_T3S3_sx1262.build_flags}
|
||||||
|
-D MAX_CONTACTS=100
|
||||||
|
-D MAX_GROUP_CHANNELS=1
|
||||||
|
-D BLE_PIN_CODE=123456
|
||||||
|
-D BLE_DEBUG_LOGGING=1
|
||||||
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
; -D MESH_DEBUG=1
|
||||||
|
build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} +<helpers/esp32/*.cpp> +<../examples/companion_radio/main.cpp>
|
||||||
|
lib_deps =
|
||||||
|
${LilyGo_T3S3_sx1262.lib_deps}
|
||||||
|
adafruit/RTClib @ ^2.1.3
|
||||||
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|
||||||
; ----------------- NRF52 ---------------------
|
; ----------------- NRF52 ---------------------
|
||||||
[nrf52_base]
|
[nrf52_base]
|
||||||
|
|||||||
@@ -8,13 +8,21 @@ class ArduinoSerialInterface : public BaseSerialInterface {
|
|||||||
uint8_t _state;
|
uint8_t _state;
|
||||||
uint16_t _frame_len;
|
uint16_t _frame_len;
|
||||||
uint16_t rx_len;
|
uint16_t rx_len;
|
||||||
|
#ifdef LILYGO_T3S3
|
||||||
|
HWCDC* _serial;
|
||||||
|
#else
|
||||||
HardwareSerial* _serial;
|
HardwareSerial* _serial;
|
||||||
|
#endif
|
||||||
uint8_t rx_buf[MAX_FRAME_SIZE];
|
uint8_t rx_buf[MAX_FRAME_SIZE];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ArduinoSerialInterface() { _isEnabled = false; _state = 0; }
|
ArduinoSerialInterface() { _isEnabled = false; _state = 0; }
|
||||||
|
|
||||||
|
#ifdef LILYGO_T3S3
|
||||||
|
void begin(HWCDC& serial) { _serial = &serial; }
|
||||||
|
#else
|
||||||
void begin(HardwareSerial& serial) { _serial = &serial; }
|
void begin(HardwareSerial& serial) { _serial = &serial; }
|
||||||
|
#endif
|
||||||
|
|
||||||
// BaseSerialInterface methods
|
// BaseSerialInterface methods
|
||||||
void enable() override;
|
void enable() override;
|
||||||
|
|||||||
Reference in New Issue
Block a user