RadioLib
Universal wireless communication library for Arduino
Loading...
Searching...
No Matches
SX1262.h
1#if !defined(_RADIOLIB_SX1262_H)
2#define _RADIOLIB_SX1262_H
3
4#include "../../TypeDef.h"
5
6#if !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// Note: this should really be "2", however, it seems that all SX1262 devices report as SX1261
16#define RADIOLIB_SX1262_CHIP_TYPE "SX1261"
17
22class SX1262: public SX126x {
23 public:
28 SX1262(Module* mod); // cppcheck-suppress noExplicitConstructor
29
30 // basic methods
31
47 virtual 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 = 1.6, bool useRegulatorLDO = false);
48
63 virtual 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 = 1.6, bool useRegulatorLDO = false);
64
78 virtual int16_t beginLRFHSS(float freq = 434.0, uint8_t bw = RADIOLIB_SX126X_LR_FHSS_BW_722_66, uint8_t cr = RADIOLIB_SX126X_LR_FHSS_CR_2_3, bool narrowGrid = true, int8_t power = 10, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
79
80 // configuration methods
81
89 int16_t setFrequency(float freq) override;
90
99 int16_t setFrequency(float freq, bool skipCalibration);
100
107 virtual int16_t setOutputPower(int8_t power) override;
108
115 int16_t checkOutputPower(int8_t power, int8_t* clipped) override;
116
123 int16_t setModem(ModemType_t modem) override;
124
125#if !RADIOLIB_GODMODE
126 private:
127#endif
128
129};
130
131#endif
132
133#endif
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
Derived class for SX1262 modules.
Definition SX1262.h:22
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz. Will automatically perfo...
Definition SX1262.cpp:70
int16_t checkOutputPower(int8_t power, int8_t *clipped) override
Check if output power is configurable.
Definition SX1262.cpp:109
virtual 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=1.6, bool useRegulatorLDO=false)
Initialization method for FSK modem.
Definition SX1262.cpp:34
int16_t setModem(ModemType_t modem) override
Set modem for the radio to use. Will perform full reset and reconfigure the radio using its default p...
Definition SX1262.cpp:117
virtual 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=1.6, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition SX1262.cpp:10
virtual int16_t setOutputPower(int8_t power) override
Sets output power. Allowed values are in range from -9 to 22 dBm. This method is virtual to allow ove...
Definition SX1262.cpp:87
virtual int16_t beginLRFHSS(float freq=434.0, uint8_t bw=RADIOLIB_SX126X_LR_FHSS_BW_722_66, uint8_t cr=RADIOLIB_SX126X_LR_FHSS_CR_2_3, bool narrowGrid=true, int8_t power=10, float tcxoVoltage=1.6, bool useRegulatorLDO=false)
Initialization method for LR-FHSS modem. This modem only supports transmission!
Definition SX1262.cpp:52
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition SX126x.h:475