phydm_psd.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __PHYDMPSD_H__
  21. #define __PHYDMPSD_H__
  22. /*#define PSD_VERSION "1.0"*/ /*2016.09.22 Dino*/
  23. #define PSD_VERSION "1.1" /*2016.10.07 Dino, Add Option for PSD Tone index Selection */
  24. #if (CONFIG_PSD_TOOL == 1)
  25. #define STOP_TRX_SUCCESS 1
  26. #define STOP_TRX_FAIL 0
  27. struct _PHYDM_PSD_ {
  28. u8 psd_in_progress;
  29. u32 psd_reg;
  30. u32 psd_report_reg;
  31. u8 psd_pwr_common_offset;
  32. u16 sw_avg_time;
  33. u16 fft_smp_point;
  34. u32 initial_gain_backup;
  35. u32 rf_0x18_bkp;
  36. u16 psd_fc_channel;
  37. u32 psd_bw_rf_reg;
  38. u8 psd_result[128];
  39. u8 noise_k_en;
  40. };
  41. u32
  42. phydm_get_psd_data(
  43. void *p_dm_void,
  44. u32 psd_tone_idx,
  45. u32 igi
  46. );
  47. void
  48. phydm_psd_debug(
  49. void *p_dm_void,
  50. char input[][16],
  51. u32 *_used,
  52. char *output,
  53. u32 *_out_len,
  54. u32 input_num
  55. );
  56. void
  57. phydm_psd(
  58. void *p_dm_void,
  59. u32 igi,
  60. u16 start_point,
  61. u16 stop_point
  62. );
  63. void
  64. phydm_psd_para_setting(
  65. void *p_dm_void,
  66. u8 sw_avg_time,
  67. u8 hw_avg_time,
  68. u8 i_q_setting,
  69. u16 fft_smp_point,
  70. u8 ant_sel,
  71. u8 psd_input,
  72. u8 channel,
  73. u8 noise_k_en
  74. );
  75. void
  76. phydm_psd_init(
  77. void *p_dm_void
  78. );
  79. u8
  80. phydm_get_psd_result_table(
  81. void *p_dm_void,
  82. int index
  83. );
  84. #endif
  85. #endif