mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-29 11:01:15 +00:00
Merge branch 'master' into issue-919
This commit is contained in:
commit
e3ee3c411c
@ -256,6 +256,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// supported modules list
|
// supported modules list
|
||||||
#define USE_SX1262
|
#define USE_SX1262
|
||||||
#define USE_SX1268
|
#define USE_SX1268
|
||||||
|
#define USE_LLCC68
|
||||||
|
|
||||||
// common pinouts for SX126X modules
|
// common pinouts for SX126X modules
|
||||||
#define SX126X_CS 18 // NSS for SX126X
|
#define SX126X_CS 18 // NSS for SX126X
|
||||||
|
14
src/main.cpp
14
src/main.cpp
@ -40,6 +40,7 @@
|
|||||||
#include "RF95Interface.h"
|
#include "RF95Interface.h"
|
||||||
#include "SX1262Interface.h"
|
#include "SX1262Interface.h"
|
||||||
#include "SX1268Interface.h"
|
#include "SX1268Interface.h"
|
||||||
|
#include "LLCC68Interface.h"
|
||||||
|
|
||||||
#ifdef NRF52_SERIES
|
#ifdef NRF52_SERIES
|
||||||
#include "variant.h"
|
#include "variant.h"
|
||||||
@ -539,6 +540,19 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_LLCC68)
|
||||||
|
if (!rIf) {
|
||||||
|
rIf = new LLCC68Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
|
||||||
|
if (!rIf->init()) {
|
||||||
|
DEBUG_MSG("Warning: Failed to find LLCC68 radio\n");
|
||||||
|
delete rIf;
|
||||||
|
rIf = NULL;
|
||||||
|
} else {
|
||||||
|
DEBUG_MSG("LLCC68 Radio init succeeded, using LLCC68 radio\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SIM_RADIO
|
#ifdef USE_SIM_RADIO
|
||||||
if (!rIf) {
|
if (!rIf) {
|
||||||
rIf = new SimRadio;
|
rIf = new SimRadio;
|
||||||
|
@ -4,3 +4,4 @@
|
|||||||
// We need this declaration for proper linking in derived classes
|
// We need this declaration for proper linking in derived classes
|
||||||
template class SX126xInterface<SX1262>;
|
template class SX126xInterface<SX1262>;
|
||||||
template class SX126xInterface<SX1268>;
|
template class SX126xInterface<SX1268>;
|
||||||
|
template class SX126xInterface<LLCC68>;
|
9
src/mesh/LLCC68Interface.cpp
Normal file
9
src/mesh/LLCC68Interface.cpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include "configuration.h"
|
||||||
|
#include "LLCC68Interface.h"
|
||||||
|
#include "error.h"
|
||||||
|
|
||||||
|
LLCC68Interface::LLCC68Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy,
|
||||||
|
SPIClass &spi)
|
||||||
|
: SX126xInterface(cs, irq, rst, busy, spi)
|
||||||
|
{
|
||||||
|
}
|
17
src/mesh/LLCC68Interface.h
Normal file
17
src/mesh/LLCC68Interface.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "SX126xInterface.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Our adapter for LLCC68 radios
|
||||||
|
* https://www.semtech.com/products/wireless-rf/lora-core/llcc68
|
||||||
|
* ⚠️⚠️⚠️
|
||||||
|
* Be aware that LLCC68 does not support Spreading Factor 12 (SF12) and will not work on the default "Long Slow" channel.
|
||||||
|
* You must change the channel if you get `Critical Error #3` with this module.
|
||||||
|
* ⚠️⚠️⚠️
|
||||||
|
*/
|
||||||
|
class LLCC68Interface : public SX126xInterface<LLCC68>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LLCC68Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user