2021-09-03 14:15:58 +00:00
|
|
|
#include "SX1268Interface.h"
|
2023-01-21 13:34:29 +00:00
|
|
|
#include "configuration.h"
|
2021-09-03 14:15:58 +00:00
|
|
|
#include "error.h"
|
|
|
|
|
2023-05-08 11:18:28 +00:00
|
|
|
SX1268Interface::SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
|
|
|
RADIOLIB_PIN_TYPE busy)
|
|
|
|
: SX126xInterface(hal, cs, irq, rst, busy)
|
2021-09-03 14:15:58 +00:00
|
|
|
{
|
2023-03-18 12:23:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float SX1268Interface::getFreq()
|
|
|
|
{
|
|
|
|
// Set frequency to default of EU_433 if outside of allowed range (e.g. when region is UNSET)
|
|
|
|
if (savedFreq < 410 || savedFreq > 810)
|
|
|
|
return 433.125f;
|
|
|
|
else
|
|
|
|
return savedFreq;
|
2021-09-03 14:15:58 +00:00
|
|
|
}
|