RadioLib
Universal wireless communication library for Arduino
Loading...
Searching...
No Matches
SX1268.h
1#if !defined(_RADIOLIB_SX1268_H)
2#define _RADIOLIB_SX1268_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_SX1268 0x00
13
14//RADIOLIB_SX126X_REG_VERSION_STRING
15#define RADIOLIB_SX1268_CHIP_TYPE "SX1268"
16
21class SX1268: public SX126x {
22 public:
27 SX1268(Module* mod); // cppcheck-suppress noExplicitConstructor
28
29 // basic methods
30
38 int16_t begin(const ConfigLoRa_t& config);
39
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 = 1.6, bool useRegulatorLDO = false);
57
65 int16_t beginFSK(const ConfigFSK_t& config);
66
82 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);
83
91 int16_t beginBPSK(const ConfigBPSK_t& config);
92
105 int16_t beginBPSK(float freq = 434.0, float br = 0.6, int8_t power = 10, float tcxoVoltage = 1.6, bool useRegulatorLDO = false);
106
114 int16_t beginLRFHSS(const ConfigLRFHSS_t& config);
115
130 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);
131
132 // configuration methods
133
141 int16_t setFrequency(float freq) override;
142
151 int16_t setFrequency(float freq, bool skipCalibration);
152
158 int16_t setOutputPower(int8_t power) override;
159
166 int16_t setOutputPower(int8_t power, bool optimize);
167
174 int16_t checkOutputPower(int8_t power, int8_t* clipped) override;
175
182 int16_t setModem(ModemType_t modem) override;
183
184#if !RADIOLIB_GODMODE
185 private:
186#endif
187
188};
189
190#endif
191
192#endif
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:69
Derived class for SX1268 modules.
Definition SX1268.h:21
int16_t beginLRFHSS(const ConfigLRFHSS_t &config)
Initialization method for LR-FHSS modem.
Definition SX1268.cpp:144
int16_t setOutputPower(int8_t power) override
Sets output power. Allowed values are in range from -9 to 22 dBm.
Definition SX1268.cpp:192
int16_t beginBPSK(const ConfigBPSK_t &config)
Initialization method for BPSK modem.
Definition SX1268.cpp:116
int16_t begin(const ConfigLoRa_t &config)
Initialization method for LoRa modem.
Definition SX1268.cpp:48
int16_t checkOutputPower(int8_t power, int8_t *clipped) override
Check if output power is configurable.
Definition SX1268.cpp:209
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 SX1268.cpp:217
int16_t beginFSK(const ConfigFSK_t &config)
Initialization method for FSK modem.
Definition SX1268.cpp:85
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz. Will automatically perfo...
Definition SX1268.cpp:174
Base class for SX126x series. All derived classes for SX126x (e.g. SX1262 or SX1268) inherit from thi...
Definition SX126x.h:37
bool useRegulatorLDO
Whether to use only LDO regulator (true) or DC-DC regulator (false). Defaults to false.
Definition SX126x.h:82
float tcxoVoltage
TCXO reference voltage to be set on DIO3. Defaults to 1.6 V. If you are seeing -706/-707 error codes,...
Definition SX126x.h:76
Definition PhysicalLayer.h:313
Definition PhysicalLayer.h:298
Definition PhysicalLayer.h:335
Definition PhysicalLayer.h:280