File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 11#include < Arduino.h>
22#include " target.h"
33
4- ESP32Board board;
4+ XiaoC6Board board;
55
66#if defined(P_LORA_SCLK)
77 static SPIClass spi (0 );
@@ -47,3 +47,5 @@ mesh::LocalIdentity radio_new_identity() {
4747 RadioNoiseListener rng (radio);
4848 return mesh::LocalIdentity (&rng); // create new random identity
4949}
50+
51+
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include < Arduino.h>
4+ #include < helpers/ESP32Board.h>
5+
6+ class XiaoC6Board : public ESP32Board {
7+ public:
8+ void begin () {
9+ ESP32Board::begin ();
10+
11+ #ifdef USE_XIAO_ESP32C6_EXTERNAL_ANTENNA
12+ // Connect an external antenna to your XIAO ESP32C6 otherwise, it may be damaged!
13+ pinMode (3 , OUTPUT);
14+ digitalWrite (3 , LOW); // Activate RF switch control
15+
16+ delay (100 );
17+
18+ pinMode (14 , OUTPUT);
19+ digitalWrite (14 , HIGH); // Use external antenna
20+ #endif
21+ }
22+
23+ const char * getManufacturerName () const override {
24+ return " Xiao C6" ;
25+ }
26+ };
27+
28+
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ build_flags =
2828 -D DISABLE_WIFI_OTA =1
2929build_src_filter = ${esp32c6_base.build_src_filter}
3030 +<../variants/xiao_c6>
31+ +<XiaoC6Board.cpp>
3132
3233[env:Xiao_C6_Repeater]
3334extends = Xiao_C6
@@ -87,6 +88,7 @@ build_flags =
8788 -D SX126X_DIO3_TCXO_VOLTAGE =1.8
8889 -D SX126X_CURRENT_LIMIT =140
8990 -D SX126X_RX_BOOSTED_GAIN =1
91+ -D USE_XIAO_ESP32C6_EXTERNAL_ANTENNA =1
9092
9193[env:Meshimi_Repeater]
9294extends = Meshimi
Original file line number Diff line number Diff line change 22
33#define RADIOLIB_STATIC_ONLY 1
44#include <RadioLib.h>
5+ #include <XiaoC6Board.h>
56#include <helpers/radiolib/RadioLibWrappers.h>
67#include <helpers/ESP32Board.h>
78#include <helpers/radiolib/CustomSX1262Wrapper.h>
89#include <helpers/AutoDiscoverRTCClock.h>
910#include <helpers/SensorManager.h>
1011
11- extern ESP32Board board ;
12+ extern XiaoC6Board board ;
1213extern WRAPPER_CLASS radio_driver ;
1314extern AutoDiscoverRTCClock rtc_clock ;
1415extern SensorManager sensors ;
You can’t perform that action at this time.
0 commit comments