GNU Radio 3.6.5.1 C++ API
fcdhidcmd.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of Qthid.
3  *
4  * Copyright (C) 2010 Howard Long, G6LVB
5  * CopyRight (C) 2011 Alexandru Csete, OZ9AEC
6  * Mario Lorenz, DL5MLO
7  *
8  * Qthid is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * Qthid is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Qthid. If not, see <http://www.gnu.org/licenses/>.
20  *
21  ***************************************************************************/
22 #ifndef FCDHIDCMD_H
23 #define FCD_HID_CMD_H 1
24 
25 
26 /* Commands applicable in bootloader mode */
27 #define FCD_CMD_BL_QUERY 1 /*!< Returns string with "FCDAPP version". */
28 #define FCD_CMD_BL_RESET 8 /*!< Reset to application mode. */
29 #define FCD_CMD_BL_ERASE 24 /*!< Erase firmware from FCD flash. */
30 #define FCD_CMD_BL_SET_BYTE_ADDR 25 /*!< TBD */
31 #define FCD_CMD_BL_GET_BYTE_ADDR_RANGE 26 /*!< Get address range. */
32 #define FCD_CMD_BL_WRITE_FLASH_BLOCK 27 /*!< Write flash block. */
33 #define FCD_CMD_BL_READ_FLASH_BLOCK 28 /*!< Read flash block. */
34 
35 /* Commands applicable in application mode */
36 #define FCD_CMD_APP_SET_FREQ_KHZ 100 /*!< Send with 3 byte unsigned little endian frequency in kHz. */
37 #define FCD_CMD_APP_SET_FREQ_HZ 101 /*!< Send with 4 byte unsigned little endian frequency in Hz, returns with actual frequency set in Hz */
38 #define FCD_CMD_APP_GET_FREQ_HZ 102 /*!< Returns 4 byte unsigned little endian frequency in Hz. */
39 
40 #define FCD_CMD_APP_GET_IF_RSSI 104 /*!< Supposed to return 1 byte unsigned IF RSSI (-35dBm=0, -10dBm=70) but it is not functional. */
41 #define FCD_CMD_APP_GET_PLL_LOCK 105 /*!< Returns 1 bit, true if locked. */
42 
43 #define FCD_CMD_APP_SET_DC_CORR 106 /*!< Send with 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value. */
44 #define FCD_CMD_APP_GET_DC_CORR 107 /*!< Returns 2 byte unsigned I DC correction followed by 2 byte unsigned Q DC correction. 32768 is the default centre value. */
45 #define FCD_CMD_APP_SET_IQ_CORR 108 /*!< Send with 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain. */
46 #define FCD_CMD_APP_GET_IQ_CORR 109 /*!< Returns 2 byte signed phase correction followed by 2 byte unsigned gain correction. 0 is the default centre value for phase correction, 32768 is the default centre value for gain. */
47 
48 #define FCD_CMD_APP_SET_LNA_GAIN 110 /*!< Send a 1 byte value, see enums for reference. */
49 #define FCD_CMD_APP_SET_LNA_ENHANCE 111
50 #define FCD_CMD_APP_SET_BAND 112
51 #define FCD_CMD_APP_SET_RF_FILTER 113
52 #define FCD_CMD_APP_SET_MIXER_GAIN 114
53 #define FCD_CMD_APP_SET_BIAS_CURRENT 115
54 #define FCD_CMD_APP_SET_MIXER_FILTER 116
55 #define FCD_CMD_APP_SET_IF_GAIN1 117
56 #define FCD_CMD_APP_SET_IF_GAIN_MODE 118
57 #define FCD_CMD_APP_SET_IF_RC_FILTER 119
58 #define FCD_CMD_APP_SET_IF_GAIN2 120
59 #define FCD_CMD_APP_SET_IF_GAIN3 121
60 #define FCD_CMD_APP_SET_IF_FILTER 122
61 #define FCD_CMD_APP_SET_IF_GAIN4 123
62 #define FCD_CMD_APP_SET_IF_GAIN5 124
63 #define FCD_CMD_APP_SET_IF_GAIN6 125
64 #define FCD_CMD_APP_SET_BIAS_TEE 126 /*!< Bias T for ext LNA. Send with one byte: 1=ON, 0=OFF. */
65 
66 #define FCD_CMD_APP_GET_LNA_GAIN 150 // Retrieve a 1 byte value, see enums for reference
67 #define FCD_CMD_APP_GET_LNA_ENHANCE 151
68 #define FCD_CMD_APP_GET_BAND 152
69 #define FCD_CMD_APP_GET_RF_FILTER 153
70 #define FCD_CMD_APP_GET_MIXER_GAIN 154
71 #define FCD_CMD_APP_GET_BIAS_CURRENT 155
72 #define FCD_CMD_APP_GET_MIXER_FILTER 156
73 #define FCD_CMD_APP_GET_IF_GAIN1 157
74 #define FCD_CMD_APP_GET_IF_GAIN_MODE 158
75 #define FCD_CMD_APP_GET_IF_RC_FILTER 159
76 #define FCD_CMD_APP_GET_IF_GAIN2 160
77 #define FCD_CMD_APP_GET_IF_GAIN3 161
78 #define FCD_CMD_APP_GET_IF_FILTER 162
79 #define FCD_CMD_APP_GET_IF_GAIN4 163
80 #define FCD_CMD_APP_GET_IF_GAIN5 164
81 #define FCD_CMD_APP_GET_IF_GAIN6 165
82 #define FCD_CMD_APP_GET_BIAS_TEE 166 /*!< Bias T. 1=ON, 0=OFF. */
83 
84 #define FCD_CMD_APP_SEND_I2C_BYTE 200
85 #define FCD_CMD_APP_RECV_I2C_BYTE 201
86 
87 #define FCD_CMD_APP_RESET 255 // Reset to bootloader
88 
89 
90 typedef enum
91 {
106 
107 typedef enum
108 {
115 
116 typedef enum
117 {
123 
124 typedef enum
125 {
126  // Band 0, VHF II
129  // Band 1, VHF III
132  // Band 2, UHF
149  // Band 2, L band
167 
168 typedef enum
169 {
173 
174 typedef enum
175 {
181 
182 typedef enum
183 {
194 
195 typedef enum
196 {
200 
201 typedef enum
202 {
206 
207 typedef enum
208 {
226 
227 typedef enum
228 {
234 
235 typedef enum
236 {
242 
243 typedef enum
244 {
249 
250 typedef enum
251 {
285 
286 typedef enum
287 {
294 
295 typedef enum
296 {
303 
304 
305 #endif // FCDHIDCMD_H