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 !defined(RADIOLIB_EXCLUDE_SX127X)
7 
8 #include "SX1278.h"
9 
15 class SX1277: public SX1278 {
16  public:
17 
18  // constructor
19 
25  SX1277(Module* mod);
26 
27  // basic methods
28 
52  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
53 
74  int16_t beginFSK(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
75 
76  // configuration methods
77 
85  int16_t setFrequency(float freq);
86 
94  int16_t setSpreadingFactor(uint8_t sf);
95 
96 #ifndef RADIOLIB_GODMODE
97  private:
98 #endif
99 
100 };
101 
102 #endif
103 
104 #endif
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition: SX1277.cpp:53
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=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
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:127
int16_t beginFSK(float freq=434.0, float br=48.0, float freqDev=50.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:35
Implements all common low-level SPI/UART/I2C methods to control the wireless module. Every module class contains one private instance of this class.
Definition: Module.h:17
Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter range...
Definition: SX1277.h:15
SX1277(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: SX1277.cpp:4
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279, RFM95 and RFM96. All of these modules use the same basic hardware and only differ in parameter ranges (and names).
Definition: SX1278.h:104