1 /******************************************************************************
3 * Copyright(c) 2007 - 2016 Realtek Corporation.
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.
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
14 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
22 * Larry Finger <Larry.Finger@lwfinger.net>
24 *****************************************************************************/
25 #ifndef __INC_ADCSMP_H
26 #define __INC_ADCSMP_H
28 #define DYNAMIC_LA_MODE "1.0" /*2016.07.15 Dino */
30 struct rt_adcsmp_string {
37 enum rt_adcsmp_trig_sel {
38 PHYDM_ADC_BB_TRIG = 0,
39 PHYDM_ADC_MAC_TRIG = 1,
40 PHYDM_ADC_RF0_TRIG = 2,
41 PHYDM_ADC_RF1_TRIG = 3,
45 enum rt_adcsmp_trig_sig_sel {
46 ADCSMP_TRIG_CRCOK = 0,
47 ADCSMP_TRIG_CRCFAIL = 1,
52 enum rt_adcsmp_state {
53 ADCSMP_STATE_IDLE = 0,
55 ADCSMP_STATE_QUERY = 2
59 struct rt_adcsmp_string adc_smp_buf;
60 enum rt_adcsmp_state adc_smp_state;
71 u8 la_work_item_index;
74 void adc_smp_set(void *dm_void, u8 trig_mode, u32 trig_sig_sel,
75 u8 dma_data_sig_sel, u32 trigger_time, u16 polling_time);
77 void adc_smp_query(void *dm_void, void *output, u32 out_len, u32 *pused);
79 s32 adc_smp_get_sample_counts(void *dm_void);
81 s32 adc_smp_query_single_data(void *dm_void, void *output, u32 out_len,
84 void adc_smp_stop(void *dm_void);
86 void adc_smp_init(void *dm_void);
88 void adc_smp_de_init(void *dm_void);
90 void phydm_la_mode_bb_setting(void *dm_void);
92 void phydm_la_mode_set_trigger_time(void *dm_void, u32 trigger_time_mu_sec);
94 void phydm_lamode_trigger_setting(void *dm_void, char input[][16], u32 *_used,
95 char *output, u32 *_out_len, u32 input_num);