litepoint.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #ifndef __LITEPOINT_H
  2. #define __LITEPOINT_H
  3. #include "wm_type_def.h"
  4. typedef struct _ltpt_rx_info
  5. {
  6. volatile int cnt_total;
  7. volatile int cnt_good;
  8. volatile int cnt_bad;
  9. volatile unsigned char valid;
  10. volatile unsigned char snr;
  11. volatile unsigned char rcpi;
  12. volatile unsigned char rate;
  13. volatile unsigned char channel;
  14. volatile unsigned char bandwidth;
  15. volatile unsigned char bprocess;
  16. }ltpt_rx_info;
  17. typedef struct _ltpt_tx_info
  18. {
  19. volatile int cnt_total;
  20. volatile int packetcount;
  21. volatile int psdulen;
  22. /* input parameters */
  23. volatile unsigned char txgain;
  24. volatile unsigned char datarate;
  25. volatile unsigned char gimode;
  26. volatile unsigned char greenfield;
  27. volatile unsigned char rifs;
  28. volatile unsigned char bprocess;
  29. volatile unsigned char channel;
  30. volatile unsigned char longpreamble;
  31. }ltpt_tx_info;
  32. enum Rate
  33. {
  34. S2M = 0x0000,
  35. S5M5 = 0x0001,
  36. S11M = 0x0002,
  37. L1M = 0x0003,
  38. L2M = 0x0004,
  39. L5M5 = 0x0005,
  40. L11M = 0x0006,
  41. R06M = 0x0100,
  42. R09M = 0x0101,
  43. R12M = 0x0102,
  44. R18M = 0x0103,
  45. R24M = 0x0104,
  46. R36M = 0x0105,
  47. R48M = 0x0106,
  48. R54M = 0x0107,
  49. MCS0 = 0x0200,
  50. MCS1 = 0x0201,
  51. MCS2 = 0x0202,
  52. MCS3 = 0x0203,
  53. MCS4 = 0x0204,
  54. MCS5 = 0x0205,
  55. MCS6 = 0x0206,
  56. MCS7 = 0x0207,
  57. MCS8 = 0x0208,
  58. MCS9 = 0x0209,
  59. MCS10 = 0x0210,
  60. MCS11 = 0x0211,
  61. MCS12 = 0x0212,
  62. MCS13 = 0x0213,
  63. MCS14 = 0x0214,
  64. MCS15 = 0x0215,
  65. MCS32 = 0x0232,
  66. };
  67. extern volatile int g_ltpt_testmode;
  68. extern ltpt_rx_info *g_ltpt_rxinfo;
  69. extern ltpt_tx_info *g_ltpt_txinfo;
  70. extern unsigned char hed_rf_txgainmap[];
  71. extern const unsigned int hed_bbp_value[];
  72. void tls_litepoint_start(void);
  73. void tls_tx_send_litepoint(void);
  74. void tls_set_test_channel(u8 channel, u8 bandwidth);
  75. void tls_tx_litepoint_test_start(u32 tempcomp,u32 Packetcnt, u16 Psdulen, u32 Gain, u32 TxRate, u8 GiMode, u8 Gf, u8 Rifs);
  76. void tls_txrx_litepoint_test_stop(void);
  77. void tls_txrx_litepoint_clear_data(void);
  78. int tls_tx_litepoint_test_get_totalsnd(void);
  79. void tls_rx_litepoint_test_start(u32 Channel, u32 BandWidth);
  80. void tls_rx_litepoint_test_result(u32 *total, u32 *goodcnt, u32 *badcnt);
  81. void tls_tx_litepoint_param_update(u8 Gain, u8 TxRate);
  82. void tls_rx_litepoint_test_rate(u8 rate);
  83. void tls_rx_litepoint_pwr_result(u32 *valid, u32 *snr, u32 *rcpi);
  84. void tls_tx_litepoint_period(u32 period);
  85. u32 tls_get_tx_litepoint_period(void);
  86. void tls_set_tx_litepoint_period(u32 period);
  87. void tls_lp_notify_lp_tx_data(void);
  88. #endif