Demo HCI Implementation for WiMOD-LR Devices  V2.0.3
FreqCalc_SX1280.c File Reference
#include "FreqCalc_SX1280.h"
Include dependency graph for FreqCalc_SX1280.c:

Functions

void FreqCalcSX1280_calcFreqToRegister (uint32_t freq, uint8_t *msb, uint8_t *mid, uint8_t *lsb)
 Translates a given frequency to the according register values of the TRX. More...
 
uint32_t FreqCalcSX1280_calcRegisterToFreq (uint8_t msb, uint8_t mid, uint8_t lsb)
 Translates given register values to a carrier frequency. More...
 

Function Documentation

◆ FreqCalcSX1280_calcFreqToRegister()

void FreqCalcSX1280_calcFreqToRegister ( uint32_t  freq,
uint8_t *  msb,
uint8_t *  mid,
uint8_t *  lsb 
)

Translates a given frequency to the according register values of the TRX.

Note: This is not 100% exact. (see formula in TRX datasheet)

Parameters
freqRF mid frequency in Hz
msbpointer where to store the MSB register value
midpointer where to store the MID register value
lsbpointer where to store the LSB register value

◆ FreqCalcSX1280_calcRegisterToFreq()

uint32_t FreqCalcSX1280_calcRegisterToFreq ( uint8_t  msb,
uint8_t  mid,
uint8_t  lsb 
)

Translates given register values to a carrier frequency.

Note: This is not 100% exact. (see formula in TRX datasheet) *

Parameters
msbthe MSB register value
midthe MID register value
lsbthe LSB register value
Return values
thecorresponding frequency in Hz