loragw_cal.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. / _____) _ | |
  3. ( (____ _____ ____ _| |_ _____ ____| |__
  4. \____ \| ___ | (_ _) ___ |/ ___) _ \
  5. _____) ) ____| | | || |_| ____( (___| | | |
  6. (______/|_____)_|_|_| \__)_____)\____)_| |_|
  7. (C)2019 Semtech
  8. Description:
  9. LoRa concentrator radio calibration functions
  10. License: Revised BSD License, see LICENSE.TXT file include in the project
  11. */
  12. #ifndef _LORAGW_CAL_H
  13. #define _LORAGW_CAL_H
  14. /* -------------------------------------------------------------------------- */
  15. /* --- DEPENDANCIES --------------------------------------------------------- */
  16. #include <stdint.h> /* C99 types*/
  17. #include "config.h" /* library configuration options (dynamically generated) */
  18. /* -------------------------------------------------------------------------- */
  19. /* --- PUBLIC CONSTANTS ----------------------------------------------------- */
  20. /* -------------------------------------------------------------------------- */
  21. /* --- PUBLIC MACROS -------------------------------------------------------- */
  22. /* -------------------------------------------------------------------------- */
  23. /* --- PUBLIC TYPES --------------------------------------------------------- */
  24. struct lgw_sx125x_cal_rx_result_s {
  25. int8_t amp;
  26. int8_t phi;
  27. uint16_t rej;
  28. uint16_t rej_init;
  29. uint16_t snr;
  30. };
  31. struct lgw_sx125x_cal_tx_result_s {
  32. uint8_t dac_gain;
  33. uint8_t mix_gain;
  34. int8_t offset_i;
  35. int8_t offset_q;
  36. uint16_t rej;
  37. uint16_t sig;
  38. };
  39. /* -------------------------------------------------------------------------- */
  40. /* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */
  41. int sx1302_cal_start(uint8_t version, struct lgw_conf_rxrf_s * rf_chain_cfg, struct lgw_tx_gain_lut_s * txgain_lut);
  42. #endif
  43. /* --- EOF ------------------------------------------------------------------ */