acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

SX1273.h (2306B)

      1 #if !defined(_RADIOLIB_SX1273_H)
      2 #define _RADIOLIB_SX1273_H
      3 
      4 #include "../../TypeDef.h"
      5 
      6 #if !defined(RADIOLIB_EXCLUDE_SX127X)
      7 
      8 #include "SX1272.h"
      9 
     10 /*!
     11   \class SX1273
     12 
     13   \brief Derived class for %SX1273 modules. Overrides some methods from SX1272 due to different parameter ranges.
     14 */
     15 class SX1273: public SX1272 {
     16   public:
     17 
     18     // constructor
     19 
     20     /*!
     21       \brief Default constructor. Called from Arduino sketch when creating new LoRa instance.
     22 
     23       \param mod Instance of Module that will be used to communicate with the %LoRa chip.
     24     */
     25     SX1273(Module* mod);
     26 
     27     // basic methods
     28 
     29     /*!
     30       \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module.
     31 
     32       \param freq Carrier frequency in MHz. Allowed values range from 860.0 MHz to 1020.0 MHz.
     33 
     34       \param bw %LoRa link bandwidth in kHz. Allowed values are 125, 250 and 500 kHz.
     35 
     36       \param sf %LoRa link spreading factor. Allowed values range from 6 to 9.
     37 
     38       \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8.
     39 
     40       \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks.
     41 
     42       \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm.
     43 
     44       \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number.
     45       Allowed values range from 6 to 65535.
     46 
     47       \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain.
     48       Set to 0 to enable automatic gain control (recommended).
     49 
     50       \returns \ref status_codes
     51     */
     52     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);
     53 
     54     // configuration methods
     55 
     56     /*!
     57       \brief Sets %LoRa link spreading factor. Allowed values range from 6 to 9. Only available in %LoRa mode.
     58 
     59       \param sf %LoRa link spreading factor to be set.
     60 
     61       \returns \ref status_codes
     62     */
     63     int16_t setSpreadingFactor(uint8_t sf);
     64 
     65 #if !defined(RADIOLIB_GODMODE)
     66   private:
     67 #endif
     68 
     69 };
     70 
     71 #endif
     72 
     73 #endif