| Demo HCI Implementation for WiMOD-LR Devices V1.3.1

- Main Page
- Classes
- Files

- File List
- File Members

Functions
FreqCalc.c File Reference

Helper Utility to calc frequency to transceiver register and vice versa. More...

`#include "FreqCalc.h"`
Include dependency graph for FreqCalc.c:

## Functions
void | FreqCalc_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 | FreqCalc_calcRegisterToFreq (uint8_t msb, uint8_t mid, uint8_t lsb)
| Translates given register values to a carrier frequency. More...

## Detailed Description

Helper Utility to calc frequency to transceiver register and vice versa.

Version
  0.1

Implementation of frequency calculator

Author
  (FB), IMST

Version
  0.1

Declarations for frequency calculator

Author
  (FB), IMST

## Function Documentation

void FreqCalc_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

  freq | RF mid frequency in Hz
  msb | pointer where to store the MSB register value
  mid | pointer where to store the MID register value
  msb | pointer where to store the LSB register value

uint32_t FreqCalc_calcRegisterToFreq | ( | uint8_t | msb,
|  | uint8_t | mid,
|  | uint8_t | lsb
| ) |  |

Translates given register values to a carrier frequency.

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

Parameters

  msb | the MSB register value
  mid | the MID register value
  msb | the LSB register value

Return values

  the | corresponding frequency in Hz