Add support for Xiao ESP32C6 with external antenna configuration
This commit is contained in:
28
src/helpers/esp32/XiaoC6Board.h
Normal file
28
src/helpers/esp32/XiaoC6Board.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <helpers/ESP32Board.h>
|
||||||
|
|
||||||
|
class XiaoC6Board : public ESP32Board {
|
||||||
|
public:
|
||||||
|
void begin() {
|
||||||
|
ESP32Board::begin();
|
||||||
|
|
||||||
|
#ifdef USE_XIAO_ESP32C6_EXTERNAL_ANTENNA
|
||||||
|
// Connect an external antenna to your XIAO ESP32C6 otherwise, it may be damaged!
|
||||||
|
pinMode(3, OUTPUT);
|
||||||
|
digitalWrite(3, LOW); // Activate RF switch control
|
||||||
|
|
||||||
|
delay(100);
|
||||||
|
|
||||||
|
pinMode(14, OUTPUT);
|
||||||
|
digitalWrite(14, HIGH); // Use external antenna
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* getManufacturerName() const override {
|
||||||
|
return "Xiao C6";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -87,6 +87,7 @@ build_flags =
|
|||||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||||
-D SX126X_CURRENT_LIMIT=140
|
-D SX126X_CURRENT_LIMIT=140
|
||||||
-D SX126X_RX_BOOSTED_GAIN=1
|
-D SX126X_RX_BOOSTED_GAIN=1
|
||||||
|
-D USE_XIAO_ESP32C6_EXTERNAL_ANTENNA=1
|
||||||
|
|
||||||
[env:Meshimi_Repeater]
|
[env:Meshimi_Repeater]
|
||||||
extends = Meshimi
|
extends = Meshimi
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
ESP32Board board;
|
XiaoC6Board board;
|
||||||
|
|
||||||
#if defined(P_LORA_SCLK)
|
#if defined(P_LORA_SCLK)
|
||||||
static SPIClass spi(0);
|
static SPIClass spi(0);
|
||||||
|
|||||||
@@ -4,11 +4,12 @@
|
|||||||
#include <RadioLib.h>
|
#include <RadioLib.h>
|
||||||
#include <helpers/radiolib/RadioLibWrappers.h>
|
#include <helpers/radiolib/RadioLibWrappers.h>
|
||||||
#include <helpers/ESP32Board.h>
|
#include <helpers/ESP32Board.h>
|
||||||
|
#include <helpers/esp32/XiaoC6Board.h>
|
||||||
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
||||||
#include <helpers/AutoDiscoverRTCClock.h>
|
#include <helpers/AutoDiscoverRTCClock.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/SensorManager.h>
|
||||||
|
|
||||||
extern ESP32Board board;
|
extern XiaoC6Board board;
|
||||||
extern WRAPPER_CLASS radio_driver;
|
extern WRAPPER_CLASS radio_driver;
|
||||||
extern AutoDiscoverRTCClock rtc_clock;
|
extern AutoDiscoverRTCClock rtc_clock;
|
||||||
extern SensorManager sensors;
|
extern SensorManager sensors;
|
||||||
|
|||||||
Reference in New Issue
Block a user