loragw_agc_params.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. / _____) _ | |
  3. ( (____ _____ ____ _| |_ _____ ____| |__
  4. \____ \| ___ | (_ _) ___ |/ ___) _ \
  5. _____) ) ____| | | || |_| ____( (___| | | |
  6. (______/|_____)_|_|_| \__)_____)\____)_| |_|
  7. (C)2019 Semtech
  8. Description:
  9. SX1302 AGC parameters definition.
  10. License: Revised BSD License, see LICENSE.TXT file include in the project
  11. */
  12. #ifndef _LORAGW_AGC_PARAMS_H
  13. #define _LORAGW_AGC_PARAMS_H
  14. /* -------------------------------------------------------------------------- */
  15. /* --- PRIVATE TYPES -------------------------------------------------------- */
  16. struct agc_gain_params_s {
  17. uint8_t ana_min;
  18. uint8_t ana_max;
  19. uint8_t ana_thresh_l;
  20. uint8_t ana_thresh_h;
  21. uint8_t dec_attn_min;
  22. uint8_t dec_attn_max;
  23. uint8_t dec_thresh_l;
  24. uint8_t dec_thresh_h1;
  25. uint8_t dec_thresh_h2;
  26. uint8_t chan_attn_min;
  27. uint8_t chan_attn_max;
  28. uint8_t chan_thresh_l;
  29. uint8_t chan_thresh_h;
  30. uint8_t deviceSel; /* sx1250 only */
  31. uint8_t hpMax; /* sx1250 only */
  32. uint8_t paDutyCycle; /* sx1250 only */
  33. };
  34. /* -------------------------------------------------------------------------- */
  35. /* --- PRIVATE CONSTANTS ---------------------------------------------------- */
  36. const struct agc_gain_params_s agc_params_sx1250 = {
  37. .ana_min = 1,
  38. .ana_max = 13,
  39. .ana_thresh_l = 3,
  40. .ana_thresh_h = 12,
  41. .dec_attn_min = 4,
  42. .dec_attn_max = 15,
  43. .dec_thresh_l = 40,
  44. .dec_thresh_h1 = 80,
  45. .dec_thresh_h2 = 90,
  46. .chan_attn_min = 4,
  47. .chan_attn_max = 14,
  48. .chan_thresh_l = 52,
  49. .chan_thresh_h = 132,
  50. .deviceSel = 0,
  51. .hpMax = 7,
  52. .paDutyCycle = 4
  53. };
  54. const struct agc_gain_params_s agc_params_sx125x = {
  55. .ana_min = 0,
  56. .ana_max = 9,
  57. .ana_thresh_l = 16,
  58. .ana_thresh_h = 35,
  59. .dec_attn_min = 7,
  60. .dec_attn_max = 11,
  61. .dec_thresh_l = 45,
  62. .dec_thresh_h1 = 100,
  63. .dec_thresh_h2 = 115,
  64. .chan_attn_min = 4,
  65. .chan_attn_max = 14,
  66. .chan_thresh_l = 52,
  67. .chan_thresh_h = 132,
  68. .deviceSel = 0,
  69. .hpMax = 0,
  70. .paDutyCycle = 0
  71. };
  72. #endif
  73. /* --- EOF ------------------------------------------------------------------ */