RadioLib Universal wireless communication library for Arduino

SX1277.h
1 #if !defined(_RADIOLIB_SX1277_H)
2 #define _RADIOLIB_SX1277_H
3
4 #include "../../TypeDef.h"
5
6 #if !RADIOLIB_EXCLUDE_SX127X
7
8 #include "SX1278.h"
9
14 class SX1277: public SX1278 {
15 public:
16
17 // constructor
18
23 SX1277(Module* mod);
24
25 // basic methods
26
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
42
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
56
57 // configuration methods
58
64 int16_t setFrequency(float freq);
65
71 int16_t setSpreadingFactor(uint8_t sf);
72
78 int16_t setDataRate(DataRate_t dr) override;
79
85 int16_t checkDataRate(DataRate_t dr) override;
86
87 #if !RADIOLIB_GODMODE
88 private:
89 #endif
90
91 };
92
97 RADIOLIB_TYPE_ALIAS(SX1277, RFM97)
98
99 #endif
100
101 #endif
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:68
RFM97
Only exists as alias for SX1277, since there seems to be no difference between RFM97 and SX1277 modul...
SX1277
Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1277.h:14
SX1277::setSpreadingFactor
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition: SX1277.cpp:82
SX1277::SX1277
SX1277(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1277.cpp:4
SX1277::setFrequency
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition: SX1277.cpp:71
SX1277::begin
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition: SX1277.cpp:8
SX1277::setDataRate
int16_t setDataRate(DataRate_t dr) override
Set data.
Definition: SX1277.cpp:112
SX1277::beginFSK
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition: SX1277.cpp:40
SX1277::checkDataRate
int16_t checkDataRate(DataRate_t dr) override
Check the data rate can be configured by this module.
Definition: SX1277.cpp:137
SX1278
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:105
DataRate_t
Common data rate structure.
Definition: PhysicalLayer.h:38