portduino cannot use this chip yet as it uses an old modified version of radiolib

pull/1816/head
Thomas Göttgens 2022-10-17 10:31:29 +02:00
rodzic 38fed8a61e
commit 5f4b93aba2
5 zmienionych plików z 20 dodań i 3 usunięć

Wyświetl plik

@ -367,7 +367,7 @@ void setup()
}
#endif
#if defined(USE_SX1281)
#if defined(USE_SX1281) && !defined(ARCH_PORTDUINO)
if (!rIf) {
rIf = new SX1281Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
if (!rIf->init()) {

Wyświetl plik

@ -2,8 +2,12 @@
#include "SX1281Interface.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,
SPIClass &spi)
: SX128xInterface(cs, irq, rst, busy, spi)
{
}
}
#endif

Wyświetl plik

@ -5,8 +5,13 @@
/**
* Our adapter for SX1281 radios
*/
#if !defined(ARCH_PORTDUINO)
class SX1281Interface : public SX128xInterface<SX1281>
{
public:
SX1281Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi);
};
};
#endif

Wyświetl plik

@ -2,6 +2,8 @@
#include "SX128xInterface.h"
#include "error.h"
#if !defined(ARCH_PORTDUINO)
// Particular boards might define a different max power based on what their hardware can do
#ifndef SX128X_MAX_POWER
#define SX128X_MAX_POWER 22
@ -241,3 +243,5 @@ bool SX128xInterface<T>::sleep()
return true;
}
#endif

Wyświetl plik

@ -1,5 +1,7 @@
#pragma once
#if !defined(ARCH_PORTDUINO)
#include "RadioLibInterface.h"
/**
@ -69,3 +71,5 @@ class SX128xInterface : public RadioLibInterface
private:
};
#endif