# RadioLib: src/modules/RFM9x/RFM95.h Source File

RFM95.h
#if !defined(_RADIOLIB_RFM95_H)
#define _RADIOLIB_RFM95_H
#include "../../TypeDef.h"
#if !defined(RADIOLIB_EXCLUDE_RFM9X)
#include "../../Module.h"
#include "../SX127x/SX127x.h"
#include "../SX127x/SX1278.h"
// SX127X_REG_VERSION
#define RADIOLIB_RFM9X_CHIP_VERSION_OFFICIAL 0x11
#define RADIOLIB_RFM9X_CHIP_VERSION_UNOFFICIAL 0x12 // according to datasheet, only 0x11 should be possible, but some modules seem to have 0x12
class RFM95: public SX1278 {
public:
// constructor
RFM95(Module* mod);
// basic methods
int16_t begin(float freq = 915.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);
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);
// configuration methods
int16_t setFrequency(float freq);
#if !defined(RADIOLIB_GODMODE)
private:
#endif
};
#endif
#endif
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:31
RFM95
Derived class for RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges...
Definition: RFM95.h:20
RFM95::begin
int16_t begin(float freq=915.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: RFM95.cpp:8
RFM95::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: RFM95.cpp:43
RFM95::RFM95
RFM95(Module *mod)
Default constructor. Called from Arduino sketch when creating new LoRa instance.
Definition: RFM95.cpp:4
RFM95::setFrequency
int16_t setFrequency(float freq)
Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz.
Definition: RFM95.cpp:82
SX1278
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition: SX1278.h:103