Walter Luu / SX1276GenericLib

Dependents:   mbed-os-example-mbed5-blinky-zchen409 NonPingPong_PICO_LoRa NonPingPong_PICO_LoRa_LP0 NonPingPong_PICO_LoRa_LP1 ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sx1276.h Source File

sx1276.h

00001 /*
00002  / _____)             _              | |
00003 ( (____  _____ ____ _| |_ _____  ____| |__
00004  \____ \| ___ |    (_   _) ___ |/ ___)  _ \
00005  _____) ) ____| | | || |_| ____( (___| | | |
00006 (______/|_____)_|_|_| \__)_____)\____)_| |_|
00007     (C) 2014 Semtech
00008 
00009 Description: Actual implementation of a SX1276 radio, inherits Radio
00010 
00011 License: Revised BSD License, see LICENSE.TXT file include in the project
00012 
00013 Maintainers: Miguel Luis, Gregory Cristian and Nicolas Huguenin
00014 */
00015 
00016 /*
00017  * additional development to make it more generic across multiple OS versions
00018  * (c) 2017 Helmut Tschemernjak
00019  * 30826 Garbsen (Hannover) Germany
00020  */
00021 
00022 #ifndef __SX1276_H__
00023 #define __SX1276_H__
00024 
00025 #include "radio.h"
00026 #include "sx1276Regs-Fsk.h"
00027 #include "sx1276Regs-LoRa.h"
00028 
00029 
00030 
00031 /*!
00032  * Radio wake-up time from sleep
00033  */
00034 #define RADIO_WAKEUP_TIME                           1 // [ms]
00035 
00036 /*!
00037  * Sync word for Private LoRa networks
00038  */
00039 #define LORA_MAC_PRIVATE_SYNCWORD                   0x12
00040 
00041 /*!
00042  * Sync word for Public LoRa networks
00043  */
00044 #define LORA_MAC_PUBLIC_SYNCWORD                    0x34
00045 
00046 
00047 /*!
00048  * SX1276 definitions
00049  */
00050 #define XTAL_FREQ                                   32000000
00051 #define FREQ_STEP                                   61.03515625
00052 
00053 #define RX_BUFFER_SIZE                              256
00054 
00055 /*!
00056  * Constant values need to compute the RSSI value
00057  */
00058 #define RSSI_OFFSET_LF                              -164.0
00059 #define RSSI_OFFSET_HF                              -157.0
00060 
00061 #define RF_MID_BAND_THRESH                          525000000
00062 
00063 
00064 
00065 
00066 /*!
00067  * Type of the supported board. [SX1276MB1MAS / SX1276MB1LAS]
00068  */
00069 typedef enum BoardType
00070 {
00071     SX1276MB1MAS = 0,
00072     SX1276MB1LAS,
00073     RFM95_SX1276,
00074     MURATA_SX1276,
00075     UNKNOWN
00076 }BoardType_t;
00077 
00078 
00079 typedef enum {
00080     LORA_SF6 =  6,  //   64 chips/symbol, SF6 requires an TCXO!
00081     LORA_SF7 =  7,  //  128 chips/symbol
00082     LORA_SF8 =  8,  //  256 chips/symbol
00083     LORA_SF9 =  9,  //  512 chips/symbol
00084     LORA_SF10 = 10, // 1024 chips/symbol
00085     LORA_SF11 = 11, // 2048 chips/symbol
00086     LORA_SF12 = 12, // 4096 chips/symbol
00087 } lora_spreading_factor_t;
00088 
00089 
00090 typedef enum {  // cyclic error coding to perform forward error detection and correction
00091     LORA_ERROR_CODING_RATE_4_5 = 1,   // 1.25x overhead
00092     LORA_ERROR_CODING_RATE_4_6 = 2,   // 1.50x overhead
00093     LORA_ERROR_CODING_RATE_4_7 = 3,   // 1.75x overhead
00094     LORA_ERROR_CODING_RATE_4_8 = 4,   // 2.00x overhead
00095 } lora_coding_rate_t;
00096 
00097 
00098 typedef enum {
00099     RF_FREQUENCY_868_0 = 868000000, // Hz
00100     RF_FREQUENCY_868_1 = 868100000, // Hz
00101     RF_FREQUENCY_868_3 = 868300000, // Hz
00102     RF_FREQUENCY_868_5 = 868500000, // Hz
00103     RF_FREQUENCY_915_0 = 915000000, // Hz
00104     RF_FREQUENCY_915_1 = 915100000, // Hz
00105     RF_FREQUENCY_915_3 = 915300000, // Hz
00106     RF_FREQUENCY_915_5 = 915500000, // Hz
00107 } rf_frequency_t;
00108 
00109 
00110 
00111 /*!
00112  * Actual implementation of a SX1276 radio, inherits Radio
00113  */
00114 class SX1276  : public Radio                  // derived from the Radio class
00115 {
00116 protected:
00117 
00118     bool isRadioActive;
00119 
00120     BoardType_t boardConnected; //1 = SX1276MB1LAS; 0 = SX1276MB1MAS
00121 
00122     uint8_t *rxtxBuffer;
00123     
00124     /*!
00125      * Hardware IO IRQ callback function definition
00126      */
00127     typedef void ( SX1276 ::*DioIrqHandler  )( void );
00128 
00129     /*!
00130      * Hardware DIO IRQ functions
00131      */
00132     DioIrqHandler  *dioIrq ;
00133 
00134 
00135 
00136     RadioSettings_t  settings;
00137 
00138     /*!
00139      * FSK bandwidth definition
00140      */
00141     struct BandwidthMap  {
00142         uint32_t bandwidth;
00143         uint8_t  RegValue;
00144     };
00145     static const struct BandwidthMap  FskBandwidths[];
00146     static const struct BandwidthMap  LoRaBandwidths[];
00147     
00148 protected:
00149 
00150     /*!
00151     * Performs the Rx chain calibration for LF and HF bands
00152     * \remark Must be called just after the reset so all registers are at their
00153     *         default values
00154     */
00155     void RxChainCalibration ( void );
00156 
00157 public:
00158     SX1276 ( RadioEvents_t *events);
00159     virtual ~SX1276 ( );
00160     
00161     
00162     
00163     
00164     //-------------------------------------------------------------------------
00165     //                        Redefined Radio functions
00166     //-------------------------------------------------------------------------
00167     /*!
00168      * @brief Return current radio status, returns true if a radios has been found.
00169      *
00170      * @param [IN] events Structure containing the driver callback functions
00171      */
00172     virtual bool Init( RadioEvents_t *events );
00173 
00174     /*!
00175      *  @brief Initializes the radio registers
00176      */
00177     virtual void RadioRegistersInit(void);
00178 
00179     /*!
00180      * Return current radio status
00181      *
00182      * @param status Radio status. [RF_IDLE, RX_RUNNING, TX_RUNNING, CAD_RUNNING]
00183      */
00184     virtual RadioState GetStatus ( void ); 
00185 
00186     /*!
00187      * @brief Configures the SX1276 with the given modem
00188      *
00189      * @param [IN] modem Modem to be used [0: FSK, 1: LoRa] 
00190      */
00191     virtual void SetModem( RadioModems_t modem );
00192 
00193     /*!
00194      * @brief Sets the channel frequency
00195      *
00196      * @param [IN] freq         Channel RF frequency
00197      */
00198     virtual void SetChannel( uint32_t freq );
00199 
00200     /*!
00201      * @brief Sets the channels configuration
00202      *
00203      * @param [IN] modem      Radio modem to be used [0: FSK, 1: LoRa]
00204      * @param [IN] freq       Channel RF frequency
00205      * @param [IN] rssiThresh RSSI threshold
00206      *
00207      * @retval isFree         [true: Channel is free, false: Channel is not free]
00208      */
00209     virtual bool IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh );
00210 
00211     /*!
00212      * @brief Generates a 32 bits random value based on the RSSI readings
00213      *
00214      * \remark This function sets the radio in LoRa modem mode and disables
00215      *         all interrupts.
00216      *         After calling this function either Radio.SetRxConfig or
00217      *         Radio.SetTxConfig functions must be called.
00218      *
00219      * @retval randomValue    32 bits random value
00220      */
00221     virtual uint32_t Random( void );
00222 
00223     /*!
00224      * @brief Sets the reception parameters
00225      *
00226      * @param [IN] modem        Radio modem to be used [0: FSK, 1: LoRa]
00227      * @param [IN] bandwidth    Sets the bandwidth
00228      *                          FSK : >= 2600 and <= 250000 Hz
00229      *                          LoRa: [0: 125 kHz, 1: 250 kHz,
00230      *                                 2: 500 kHz, 3: Reserved]
00231      * @param [IN] datarate     Sets the Datarate
00232      *                          FSK : 600..300000 bits/s
00233      *                          LoRa: [6: 64, 7: 128, 8: 256, 9: 512,
00234      *                                10: 1024, 11: 2048, 12: 4096  chips]
00235      * @param [IN] coderate     Sets the coding rate ( LoRa only )
00236      *                          FSK : N/A ( set to 0 )
00237      *                          LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
00238      * @param [IN] bandwidthAfc Sets the AFC Bandwidth ( FSK only )
00239      *                          FSK : >= 2600 and <= 250000 Hz
00240      *                          LoRa: N/A ( set to 0 )
00241      * @param [IN] preambleLen  Sets the Preamble length ( LoRa only )
00242      *                          FSK : N/A ( set to 0 )
00243      *                          LoRa: Length in symbols ( the hardware adds 4 more symbols )
00244      * @param [IN] symbTimeout  Sets the RxSingle timeout value
00245      *                          FSK : timeout number of bytes
00246      *                          LoRa: timeout in symbols
00247      * @param [IN] fixLen       Fixed length packets [0: variable, 1: fixed]
00248      * @param [IN] payloadLen   Sets payload length when fixed lenght is used
00249      * @param [IN] crcOn        Enables/Disables the CRC [0: OFF, 1: ON]
00250      * @param [IN] freqHopOn    Enables disables the intra-packet frequency hopping  [0: OFF, 1: ON] (LoRa only)
00251      * @param [IN] hopPeriod    Number of symbols bewteen each hop (LoRa only)
00252      * @param [IN] iqInverted   Inverts IQ signals ( LoRa only )
00253      *                          FSK : N/A ( set to 0 )
00254      *                          LoRa: [0: not inverted, 1: inverted]
00255      * @param [IN] rxContinuous Sets the reception in continuous mode
00256      *                          [false: single mode, true: continuous mode]
00257      */
00258     virtual void SetRxConfig ( RadioModems_t modem, uint32_t bandwidth,
00259                                uint32_t datarate, uint8_t coderate,
00260                                uint32_t bandwidthAfc, uint16_t preambleLen,
00261                                uint16_t symbTimeout, bool fixLen,
00262                                uint8_t payloadLen,
00263                                bool crcOn, bool freqHopOn, uint8_t hopPeriod,
00264                                bool iqInverted, bool rxContinuous );
00265 
00266     /*!
00267      * @brief Sets the transmission parameters
00268      *
00269      * @param [IN] modem        Radio modem to be used [0: FSK, 1: LoRa]
00270      * @param [IN] power        Sets the output power [dBm]
00271      * @param [IN] fdev         Sets the frequency deviation ( FSK only )
00272      *                          FSK : [Hz]
00273      *                          LoRa: 0
00274      * @param [IN] bandwidth    Sets the bandwidth ( LoRa only )
00275      *                          FSK : 0
00276      *                          LoRa: [0: 125 kHz, 1: 250 kHz,
00277      *                                 2: 500 kHz, 3: Reserved]
00278      * @param [IN] datarate     Sets the Datarate
00279      *                          FSK : 600..300000 bits/s
00280      *                          LoRa: [6: 64, 7: 128, 8: 256, 9: 512,
00281      *                                10: 1024, 11: 2048, 12: 4096  chips]
00282      * @param [IN] coderate     Sets the coding rate ( LoRa only )
00283      *                          FSK : N/A ( set to 0 )
00284      *                          LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
00285      * @param [IN] preambleLen  Sets the preamble length
00286      * @param [IN] fixLen       Fixed length packets [0: variable, 1: fixed]
00287      * @param [IN] crcOn        Enables disables the CRC [0: OFF, 1: ON]
00288      * @param [IN] freqHopOn    Enables disables the intra-packet frequency hopping  [0: OFF, 1: ON] (LoRa only)
00289      * @param [IN] hopPeriod    Number of symbols bewteen each hop (LoRa only)
00290      * @param [IN] iqInverted   Inverts IQ signals ( LoRa only )
00291      *                          FSK : N/A ( set to 0 )
00292      *                          LoRa: [0: not inverted, 1: inverted]
00293      * @param [IN] timeout      Transmission timeout [ms]
00294      */
00295     virtual void SetTxConfig( RadioModems_t modem, int8_t power, uint32_t fdev,
00296                               uint32_t bandwidth, uint32_t datarate,
00297                               uint8_t coderate, uint16_t preambleLen,
00298                               bool fixLen, bool crcOn, bool freqHopOn,
00299                               uint8_t hopPeriod, bool iqInverted, uint32_t timeout );
00300 
00301     
00302     /*!
00303      * @brief Checks if the given RF frequency is supported by the hardware
00304      *
00305      * @param [IN] frequency RF frequency to be checked
00306      * @retval isSupported [true: supported, false: unsupported]
00307      */
00308     virtual bool CheckRfFrequency( uint32_t frequency ) = 0;
00309     
00310     /*!
00311      * @brief Computes the packet time on air for the given payload
00312      *
00313      * \Remark Can only be called once SetRxConfig or SetTxConfig have been called
00314      *
00315      * @param [IN] modem      Radio modem to be used [0: FSK, 1: LoRa]
00316      * @param [IN] pktLen     Packet payload length
00317      *
00318      * @retval airTime        Computed airTime for the given packet payload length
00319      */
00320     virtual uint32_t TimeOnAir ( RadioModems_t modem, int16_t pktLen );
00321 
00322     /*!
00323      * @brief Sends the buffer of size. Prepares the packet to be sent and sets
00324      *        the radio in transmission
00325      *
00326      * @param [IN]: buffer     Buffer pointer
00327      * @param [IN]: size       Buffer size
00328      * @param [IN]: buffer     Header pointer
00329      * @param [IN]: size       Header size
00330      */
00331     virtual void Send(void *buffer, int16_t size, void *header = NULL, int16_t hsize = 0);
00332 
00333     /*!
00334      * @brief Sets the radio in sleep mode
00335      */
00336     virtual void Sleep( void );
00337     
00338     /*!
00339      * @brief Sets the radio in standby mode
00340      */
00341     virtual void Standby( void );
00342     
00343     /*!
00344      * @brief Sets the radio in CAD mode
00345      */
00346     virtual void StartCad( void );
00347 
00348     /*!
00349      * @brief Sets the radio in reception mode for the given time
00350      * @param [IN] timeout Reception timeout [ms]
00351      *                     [0: continuous, others timeout]
00352      */
00353     virtual void Rx( uint32_t timeout );
00354     
00355     /*!
00356      * @brief Check is radio receives a signal
00357      */
00358     virtual bool RxSignalPending();
00359 
00360 
00361     /*!
00362      * @brief Sets the radio in transmission mode for the given time
00363      * @param [IN] timeout Transmission timeout [ms]
00364      *                     [0: continuous, others timeout]
00365      */
00366     virtual void Tx( uint32_t timeout );
00367 
00368     /*!
00369      * @brief Sets the radio in continuous wave transmission mode
00370      *
00371      * @param [IN]: freq       Channel RF frequency
00372      * @param [IN]: power      Sets the output power [dBm]
00373      * @param [IN]: time       Transmission mode timeout [s]
00374      */
00375 
00376     virtual void SetTxContinuousWave( uint32_t freq, int8_t power, uint16_t time );
00377 
00378     /*!
00379      * @brief Returns the maximal transfer unit for a given modem
00380      *
00381      * @retval MTU size in bytes
00382      */
00383     virtual int16_t MaxMTUSize( RadioModems_t modem );
00384     
00385     /*!
00386      * @brief Reads the current RSSI value
00387      *
00388      * @retval rssiValue Current RSSI value in [dBm]
00389      */
00390     virtual int16_t GetRssi ( RadioModems_t modem );
00391     
00392     /*!
00393      * @brief Reads the current frequency error
00394      *
00395      * @retval frequency error value in [Hz]
00396      */
00397     virtual int32_t GetFrequencyError( RadioModems_t modem );
00398     
00399     /*!
00400      * @brief Writes the radio register at the specified address
00401      *
00402      * @param [IN]: addr Register address
00403      * @param [IN]: data New register value
00404      */
00405     virtual void Write ( uint8_t addr, uint8_t data ) = 0;
00406 
00407     /*!
00408      * @brief Reads the radio register at the specified address
00409      *
00410      * @param [IN]: addr Register address
00411      * @retval data Register value
00412      */
00413     virtual uint8_t Read ( uint8_t addr ) = 0;
00414 
00415     /*!
00416      * @brief Writes multiple radio registers starting at address
00417      *
00418      * @param [IN] addr   First Radio register address
00419      * @param [IN] buffer Buffer containing the new register's values
00420      * @param [IN] size   Number of registers to be written
00421      */
00422     virtual void Write( uint8_t addr, void *buffer, uint8_t size ) = 0;
00423 
00424     /*!
00425      * @brief Reads multiple radio registers starting at address
00426      *
00427      * @param [IN] addr First Radio register address
00428      * @param [OUT] buffer Buffer where to copy the registers data
00429      * @param [IN] size Number of registers to be read
00430      */
00431     virtual void Read ( uint8_t addr, void *buffer, uint8_t size ) = 0;
00432 
00433     /*!
00434      * @brief Writes the buffer contents to the SX1276 FIFO
00435      *
00436      * @param [IN] buffer Buffer containing data to be put on the FIFO.
00437      * @param [IN] size Number of bytes to be written to the FIFO
00438      */
00439     virtual void WriteFifo( void *buffer, uint8_t size ) = 0;
00440 
00441     /*!
00442      * @brief Reads the contents of the SX1276 FIFO
00443      *
00444      * @param [OUT] buffer Buffer where to copy the FIFO read data.
00445      * @param [IN] size Number of bytes to be read from the FIFO
00446      */
00447     virtual void ReadFifo( void *buffer, uint8_t size ) = 0;
00448     /*!
00449      * @brief Resets the SX1276
00450      */
00451     virtual void Reset( void ) = 0;
00452 
00453     /*!
00454      * @brief Sets the maximum payload length.
00455      *
00456      * @param [IN] modem      Radio modem to be used [0: FSK, 1: LoRa]
00457      * @param [IN] max        Maximum payload length in bytes
00458      */
00459     virtual void SetMaxPayloadLength( RadioModems_t modem, uint8_t max );
00460 
00461     /*!
00462      * \brief Sets the network to public or private. Updates the sync byte.
00463      *
00464      * \remark Applies to LoRa modem only
00465      *
00466      * \param [IN] enable if true, it enables a public network
00467      */
00468     virtual void SetPublicNetwork( bool enable );
00469 
00470     /*!
00471      * @brief Sets the radio output power.
00472      *
00473      * @param [IN] power Sets the RF output power
00474      */
00475     virtual void SetRfTxPower( int8_t power ) = 0;
00476     
00477     //-------------------------------------------------------------------------
00478     //                        Board relative functions
00479     //-------------------------------------------------------------------------
00480     /*!
00481      * Radio registers definition
00482      */
00483     struct RadioRegisters  {
00484         ModemType   Modem;
00485         uint8_t     Addr;
00486         uint8_t     Value;
00487     };
00488     
00489     
00490     static const struct RadioRegisters  RadioRegsInit[];
00491 
00492     typedef enum {
00493         RXTimeoutTimer,
00494         TXTimeoutTimer,
00495         RXTimeoutSyncWordTimer
00496     } TimeoutTimer_t;
00497 
00498 
00499 protected:
00500     /*!
00501      * @brief Initializes the radio I/Os pins interface
00502      */
00503     virtual void IoInit( void ) = 0;
00504     
00505     /*!
00506      * @brief Initializes the radio SPI
00507      */
00508     virtual void SpiInit( void ) = 0;
00509 
00510     /*!
00511      * @brief Initializes DIO IRQ handlers
00512      *
00513      * @param [IN] irqHandlers Array containing the IRQ callback functions
00514      */
00515     virtual void IoIrqInit( DioIrqHandler  *irqHandlers ) = 0;
00516 
00517     /*!
00518      * @brief De-initializes the radio I/Os pins interface. 
00519      *
00520      * \remark Useful when going in MCU lowpower modes
00521      */
00522     virtual void IoDeInit( void ) = 0;
00523 
00524     /*!
00525      * @brief Gets the board PA selection configuration
00526      *
00527      * @param [IN] channel Channel frequency in Hz
00528      * @retval PaSelect RegPaConfig PaSelect value
00529      */
00530     virtual uint8_t GetPaSelect( uint32_t channel ) = 0;
00531 
00532     /*!
00533      * @brief Set the RF Switch I/Os pins in Low Power mode
00534      *
00535      * @param [IN] status enable or disable
00536      */
00537     virtual void SetAntSwLowPower( bool status ) = 0;
00538 
00539     /*!
00540      * @brief Initializes the RF Switch I/Os pins interface
00541      */
00542     virtual void AntSwInit( void ) = 0;
00543 
00544     /*!
00545      * @brief De-initializes the RF Switch I/Os pins interface 
00546      *
00547      * \remark Needed to decrease the power consumption in MCU lowpower modes
00548      */
00549     virtual void AntSwDeInit( void ) = 0;
00550 
00551     /*!
00552      * @brief Controls the antenna switch if necessary.
00553      *
00554      * \remark see errata note
00555      *
00556      * @param [IN] opMode Current radio operating mode
00557      */
00558     virtual void SetAntSw( uint8_t opMode ) = 0;
00559     
00560     typedef void ( SX1276 ::*timeoutFuncPtr)( void );
00561     
00562     
00563     /*
00564      * The the Timeout for a given Timer.
00565      */
00566     virtual void SetTimeout(TimeoutTimer_t timer, timeoutFuncPtr, int timeout_ms = 0) = 0;
00567     
00568     /*
00569      * A simple ms sleep
00570      */
00571     virtual void Sleep_ms(int ms) = 0;
00572 
00573 protected:
00574 
00575     /*!
00576      * @brief Sets the SX1276 operating mode
00577      *
00578      * @param [IN] opMode New operating mode
00579      */
00580     virtual void SetOpMode( uint8_t opMode );
00581 
00582     /*
00583      * SX1276 DIO IRQ callback functions prototype
00584      */
00585 
00586     /*!
00587      * @brief DIO 0 IRQ callback
00588      */
00589     virtual void OnDio0Irq( void );
00590 
00591     /*!
00592      * @brief DIO 1 IRQ callback
00593      */
00594     virtual void OnDio1Irq( void );
00595 
00596     /*!
00597      * @brief DIO 2 IRQ callback
00598      */
00599     virtual void OnDio2Irq( void );
00600 
00601     /*!
00602      * @brief DIO 3 IRQ callback
00603      */
00604     virtual void OnDio3Irq( void );
00605 
00606     /*!
00607      * @brief DIO 4 IRQ callback
00608      */
00609     virtual void OnDio4Irq( void );
00610 
00611     /*!
00612      * @brief DIO 5 IRQ callback
00613      */
00614     virtual void OnDio5Irq( void );
00615 
00616     /*!
00617      * @brief Tx & Rx timeout timer callback
00618      */
00619     virtual void OnTimeoutIrq( void );
00620 
00621     /*!
00622      * Returns the known FSK bandwidth registers value
00623      *
00624      * \param [IN] bandwidth Bandwidth value in Hz
00625      * \retval regValue Bandwidth register value.
00626      */
00627     static uint8_t GetFskBandwidthRegValue ( uint32_t bandwidth );
00628 
00629     static uint8_t GetLoRaBandwidthRegValue ( uint32_t bandwidth );
00630     
00631     enum {
00632         LORA_BANKWIDTH_7kHz  = 0, //  7.8 kHz requires TCXO
00633         LORA_BANKWIDTH_10kHz = 1, // 10.4 kHz requires TCXO
00634         LORA_BANKWIDTH_15kHz = 2, // 15.6 kHz requires TCXO
00635         LORA_BANKWIDTH_20kHz = 3, // 20.8 kHz requires TCXO
00636         LORA_BANKWIDTH_31kHz = 4, // 31.2 kHz requires TCXO
00637         LORA_BANKWIDTH_41kHz = 5, // 41.4 kHz requires TCXO
00638         LORA_BANKWIDTH_62kHz = 6, // 62.5 kHz requires TCXO
00639         LORA_BANKWIDTH_125kHz = 7,
00640         LORA_BANKWIDTH_250kHz = 8,
00641         LORA_BANKWIDTH_500kHz = 9,
00642         LORA_BANKWIDTH_RESERVED = 10,
00643     };
00644 };
00645 
00646 #endif // __SX1276_H__