RadioLib
Universal wireless communication library for Arduino
SX1262.h
1 #if !defined(_RADIOLIB_SX1262_H)
2 #define _RADIOLIB_SX1262_H
3 
4 #include "../../TypeDef.h"
5 
6 #if !defined(RADIOLIB_EXCLUDE_SX126X)
7 
8 #include "../../Module.h"
9 #include "SX126x.h"
10 
11 //RADIOLIB_SX126X_CMD_SET_PA_CONFIG
12 #define RADIOLIB_SX126X_PA_CONFIG_SX1262 0x00
13 
14 //RADIOLIB_SX126X_REG_VERSION_STRING
15 #define RADIOLIB_SX1262_CHIP_TYPE 2
16 
22 class SX1262: public SX126x {
23  public:
29  SX1262(Module* mod);
30 
31  // basic methods
32 
56  int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX126X_SYNC_WORD_PRIVATE, int8_t power = 10, uint16_t preambleLength = 8, float tcxoVoltage = 0, bool useRegulatorLDO = false);
57 
79  int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 156.2, int8_t power = 10, uint16_t preambleLength = 16, float tcxoVoltage = 0, bool useRegulatorLDO = false);
80 
81  int16_t beginLRFHSS(float freq = 434.0, float tcxoVoltage = 0, bool useRegulatorLDO = false);
82 
83  // configuration methods
84 
92  int16_t setFrequency(float freq);
93 
103  int16_t setFrequency(float freq, bool calibrate);
104 
113  virtual int16_t setOutputPower(int8_t power);
114 
115 #if !defined(RADIOLIB_GODMODE)
116  private:
117 #endif
118 
119 };
120 
121 #endif
122 
123 #endif
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:16
Derived class for SX1262 modules.
Definition: SX1262.h:22
SX1262(Module *mod)
Default constructor.
Definition: SX1262.cpp:4
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX126X_SYNC_WORD_PRIVATE, int8_t power=10, uint16_t preambleLength=8, float tcxoVoltage=0, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX1262.cpp:8
virtual int16_t setOutputPower(int8_t power)
Sets output power. Allowed values are in range from -9 to 22 dBm. This method is virtual to allow ove...
Definition: SX1262.cpp:96
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz.
Definition: SX1262.cpp:62
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=156.2, int8_t power=10, uint16_t preambleLength=16, float tcxoVoltage=0, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition: SX1262.cpp:32
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition: SX126x.h:424