Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/ad9361/sw/console_commands/command.h

raw symbols SCIP
1 /**************************************************************************//**
2 * @file command.h
3 * @brief Header file of AD9361 Command Driver.
4 * @author DBogdan ([email protected])
5 *******************************************************************************
6 * Copyright 2013(c) Analog Devices, Inc.
7 *
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 * - Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * - Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * - Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 * - The use of this software may or may not infringe the patent rights
22 * of one or more patent holders. This license does not release you
23 * from the requirement that you obtain separate licenses from these
24 * patent holders to use this software.
25 * - Use of the software either in source or binary form, must be run
26 * on or directly connected to an Analog Devices Inc. component.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *******************************************************************************/
39 #ifndef __COMMAND_H__
40 #define __COMMAND_H__
41
42 /******************************************************************************/
43 /********************** Macros and Constants Definitions **********************/
44 /******************************************************************************/
45 #define NULL ((void *)0)
46 #define SUCCESS 0
47 #define ERROR -1
48
49 /******************************************************************************/
50 /*************************** Types Declarations *******************************/
51 /******************************************************************************/
52 typedef void (*cmd_function)(double* param, char param_no);
53 typedef struct
54 {
55 const char* name;
56 const char* description;
57 const char* example;
58 cmd_function function;
59 }command;
60
61 /******************************************************************************/
62 /************************ Functions Declarations ******************************/
63 /******************************************************************************/
64
65 /* Displays all available commands. */
66 void get_help(double* param, char param_no);
67
68 /* Gets the specified register value. */
69 void get_register(double* param, char param_no);
70
71 /* Gets current TX LO frequency. */
72 void get_tx_lo_freq(double* param, char param_no);
73
74 /* Sets the TX LO frequency. */
75 void set_tx_lo_freq(double* param, char param_no);
76
77 /* Gets current TX sampling frequency. */
78 void get_tx_samp_freq(double* param, char param_no);
79
80 /* Sets the TX sampling frequency. */
81 void set_tx_samp_freq(double* param, char param_no);
82
83 /* Gets current TX RF bandwidth. */
84 void get_tx_rf_bandwidth(double* param, char param_no);
85
86 /* Sets the TX RF bandwidth. */
87 void set_tx_rf_bandwidth(double* param, char param_no);
88
89 /* Gets current TX1 attenuation. */
90 void get_tx1_attenuation(double* param, char param_no);
91
92 /* Sets the TX1 attenuation. */
93 void set_tx1_attenuation(double* param, char param_no);
94
95 /* Gets current TX2 attenuation. */
96 void get_tx2_attenuation(double* param, char param_no);
97
98 /* Sets the TX2 attenuation. */
99 void set_tx2_attenuation(double* param, char param_no);
100
101 /* Gets current TX FIR state. */
102 void get_tx_fir_en(double* param, char param_no);
103
104 /* Sets the TX FIR state. */
105 void set_tx_fir_en(double* param, char param_no);
106
107 /* Gets current RX LO frequency. */
108 void get_rx_lo_freq(double* param, char param_no);
109
110 /* Sets the RX LO frequency. */
111 void set_rx_lo_freq(double* param, char param_no);
112
113 /* Gets current RX sampling frequency. */
114 void get_rx_samp_freq(double* param, char param_no);
115
116 /* Sets the RX sampling frequency. */
117 void set_rx_samp_freq(double* param, char param_no);
118
119 /* Gets current RX RF bandwidth. */
120 void get_rx_rf_bandwidth(double* param, char param_no);
121
122 /* Sets the RX RF bandwidth. */
123 void set_rx_rf_bandwidth(double* param, char param_no);
124
125 /* Gets current RX1 GC mode. */
126 void get_rx1_gc_mode(double* param, char param_no);
127
128 /* Sets the RX1 GC mode. */
129 void set_rx1_gc_mode(double* param, char param_no);
130
131 /* Gets current RX2 GC mode. */
132 void get_rx2_gc_mode(double* param, char param_no);
133
134 /* Sets the RX2 GC mode. */
135 void set_rx2_gc_mode(double* param, char param_no);
136
137 /* Gets current RX1 RF gain. */
138 void get_rx1_rf_gain(double* param, char param_no);
139
140 /* Sets the RX1 RF gain. */
141 void set_rx1_rf_gain(double* param, char param_no);
142
143 /* Gets current RX2 RF gain. */
144 void get_rx2_rf_gain(double* param, char param_no);
145
146 /* Sets the RX2 RF gain. */
147 void set_rx2_rf_gain(double* param, char param_no);
148
149 /* Gets current RX FIR state. */
150 void get_rx_fir_en(double* param, char param_no);
151
152 /* Sets the RX FIR state. */
153 void set_rx_fir_en(double* param, char param_no);
154
155 /* Gets current DDS TX1 Tone 1 frequency [Hz]. */
156 void get_dds_tx1_tone1_freq(double* param, char param_no);
157
158 /* Sets the DDS TX1 Tone 1 frequency [Hz]. */
159 void set_dds_tx1_tone1_freq(double* param, char param_no);
160
161 /* Gets current DDS TX1 Tone 2 frequency [Hz]. */
162 void get_dds_tx1_tone2_freq(double* param, char param_no);
163
164 /* Sets the DDS TX1 Tone 2 frequency [Hz]. */
165 void set_dds_tx1_tone2_freq(double* param, char param_no);
166
167 /* Gets current DDS TX1 Tone 1 phase [degrees]. */
168 void get_dds_tx1_tone1_phase(double* param, char param_no);
169
170 /* Sets the DDS TX1 Tone 1 phase [degrees]. */
171 void set_dds_tx1_tone1_phase(double* param, char param_no);
172
173 /* Gets current DDS TX1 Tone 2 phase [degrees]. */
174 void get_dds_tx1_tone2_phase(double* param, char param_no);
175
176 /* Sets the DDS TX1 Tone 2 phase [degrees]. */
177 void set_dds_tx1_tone2_phase(double* param, char param_no);
178
179 /* Gets current DDS TX1 Tone 1 scale. */
180 void get_dds_tx1_tone1_scale(double* param, char param_no);
181
182 /* Sets the DDS TX1 Tone 1 scale. */
183 void set_dds_tx1_tone1_scale(double* param, char param_no);
184
185 /* Gets current DDS TX1 Tone 2 scale. */
186 void get_dds_tx1_tone2_scale(double* param, char param_no);
187
188 /* Sets the DDS TX1 Tone 2 scale. */
189 void set_dds_tx1_tone2_scale(double* param, char param_no);
190
191 /* Gets current DDS TX2 Tone 1 frequency [Hz]. */
192 void get_dds_tx2_tone1_freq(double* param, char param_no);
193
194 /* Sets the DDS TX2 Tone 1 frequency [Hz]. */
195 void set_dds_tx2_tone1_freq(double* param, char param_no);
196
197 /* Gets current DDS TX2 Tone 2 frequency [Hz]. */
198 void get_dds_tx2_tone2_freq(double* param, char param_no);
199
200 /* Sets the DDS TX2 Tone 2 frequency [Hz]. */
201 void set_dds_tx2_tone2_freq(double* param, char param_no);
202
203 /* Gets current DDS TX2 Tone 1 phase [degrees]. */
204 void get_dds_tx2_tone1_phase(double* param, char param_no);
205
206 /* Sets the DDS TX2 Tone 1 phase [degrees]. */
207 void set_dds_tx2_tone1_phase(double* param, char param_no);
208
209 /* Gets current DDS TX2 Tone 2 phase [degrees]. */
210 void get_dds_tx2_tone2_phase(double* param, char param_no);
211
212 /* Sets the DDS TX2 Tone 2 phase [degrees]. */
213 void set_dds_tx2_tone2_phase(double* param, char param_no);
214
215 /* Gets current DDS TX2 Tone 1 scale. */
216 void get_dds_tx2_tone1_scale(double* param, char param_no);
217
218 /* Sets the DDS TX2 Tone 1 scale. */
219 void set_dds_tx2_tone1_scale(double* param, char param_no);
220
221 /* Gets current DDS TX2 Tone 2 scale. */
222 void dds_tx2_tone2_scale(double* param, char param_no);
223
224 /* Sets the DDS TX2 Tone 2 scale. */
225 void set_dds_tx2_tone2_scale(double* param, char param_no);
226
227 #endif // __COMMAND_H__