mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-15 09:32:08 +00:00
portduino cannot use this chip yet as it uses an old modified version of radiolib
This commit is contained in:
parent
38fed8a61e
commit
5f4b93aba2
@ -367,7 +367,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_SX1281)
|
#if defined(USE_SX1281) && !defined(ARCH_PORTDUINO)
|
||||||
if (!rIf) {
|
if (!rIf) {
|
||||||
rIf = new SX1281Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
|
rIf = new SX1281Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
|
@ -2,8 +2,12 @@
|
|||||||
#include "SX1281Interface.h"
|
#include "SX1281Interface.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
#if !defined(ARCH_PORTDUINO)
|
||||||
|
|
||||||
SX1281Interface::SX1281Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy,
|
SX1281Interface::SX1281Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy,
|
||||||
SPIClass &spi)
|
SPIClass &spi)
|
||||||
: SX128xInterface(cs, irq, rst, busy, spi)
|
: SX128xInterface(cs, irq, rst, busy, spi)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -5,8 +5,13 @@
|
|||||||
/**
|
/**
|
||||||
* Our adapter for SX1281 radios
|
* Our adapter for SX1281 radios
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(ARCH_PORTDUINO)
|
||||||
|
|
||||||
class SX1281Interface : public SX128xInterface<SX1281>
|
class SX1281Interface : public SX128xInterface<SX1281>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SX1281Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi);
|
SX1281Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -2,6 +2,8 @@
|
|||||||
#include "SX128xInterface.h"
|
#include "SX128xInterface.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
#if !defined(ARCH_PORTDUINO)
|
||||||
|
|
||||||
// Particular boards might define a different max power based on what their hardware can do
|
// Particular boards might define a different max power based on what their hardware can do
|
||||||
#ifndef SX128X_MAX_POWER
|
#ifndef SX128X_MAX_POWER
|
||||||
#define SX128X_MAX_POWER 22
|
#define SX128X_MAX_POWER 22
|
||||||
@ -241,3 +243,5 @@ bool SX128xInterface<T>::sleep()
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(ARCH_PORTDUINO)
|
||||||
|
|
||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,3 +71,5 @@ class SX128xInterface : public RadioLibInterface
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user