1 //  Copyright (c) <2013> <Mike. J. Keehan>
2 //
3 // Permission is hereby granted, free of charge, to any person
4 // obtaining a copy of this software and associated documentation
5 // files (the "Software"), to deal in the Software without restriction,
6 // including without limitation the rights to use, copy, modify,
7 // merge, publish, distribute, sublicense, and/or sell copies of
8 // the Software, and to permit persons to whom the Software is
9 // furnished to do so, subject to the following conditions:
10 //
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
21 // OR OTHER DEALINGS IN THE SOFTWARE.
22 //
23 //
24 //
25 ////////////////////////////////////////////////////////
26 //
27 //  fcdpp.h     header file for the FCDPP Linrad driver
28 //
29 //
30 //  This file is based on FCDHidCmd.h from Howard Long's
31 //  FCHid2002 program.
32 //
33 //  M. J. Keehan, 25th Feb 2013  (mike@keehan.net)
34 //
35 ////////////////////////////////////////////////////////
36 
37 
38 #define FCD_HID_CMD_QUERY              1 // Returns string with "FCDAPP version"
39 
40 #define FCD_HID_CMD_SET_FREQUENCY    100 // Send with 3 byte unsigned little endian frequency in kHz.
41 #define FCD_HID_CMD_SET_FREQUENCY_HZ 101 // Send with 4 byte unsigned little endian frequency in Hz,
42                                          // returns with actual frequency set in Hz
43 #define FCD_HID_CMD_GET_FREQUENCY_HZ 102 // Returns 4 byte unsigned little endian frequency in Hz.
44 
45 #define FCD_HID_CMD_SET_LNA_GAIN     110 // Send one byte, 1 on, 0 off
46 #define FCD_HID_CMD_SET_RF_FILTER    113 // Send one byte enum, see TUNERRFFILTERENUM
47 #define FCD_HID_CMD_SET_MIXER_GAIN   114 // Send one byte, 1 on, 0 off
48 #define FCD_HID_CMD_SET_IF_GAIN      117 // Send one byte value, valid value 0 to 59 (dB)
49 #define FCD_HID_CMD_SET_IF_FILTER    122 // Send one byte enum, see TUNERIFFILTERENUM
50 #define FCD_HID_CMD_SET_BIAS_TEE     126 // Send one byte, 1 on, 0 off
51 
52 #define FCD_HID_CMD_GET_LNA_GAIN     150 // Returns one byte, 1 on, 0 off
53 #define FCD_HID_CMD_GET_RF_FILTER    153 // Returns one byte enum, see TUNERRFFILTERENUM
54 #define FCD_HID_CMD_GET_MIXER_GAIN   154 // Returns one byte, 1 on, 0 off
55 #define FCD_HID_CMD_GET_IF_GAIN      157 // Returns one byte value, valid value 0 to 59 (dB)
56 #define FCD_HID_CMD_GET_IF_FILTER    162 // Returns one byte enum, see TUNERIFFILTERENUM
57 #define FCD_HID_CMD_GET_BIAS_TEE     166 // Returns one byte, 1 on, 0 off
58 
59 #define FCD_RESET                    255 // Reset to bootloader
60 
61 typedef enum
62 {
63   TRFE_0_4=0,
64   TRFE_4_8=1,
65   TRFE_8_16=2,
66   TRFE_16_32=3,
67   TRFE_32_75=4,
68   TRFE_75_125=5,
69   TRFE_125_250=6,
70   TRFE_145=7,
71   TRFE_410_875=8,
72   TRFE_435=9,
73   TRFE_875_2000=10
74 } TUNERRFFILTERENUM;
75 
76 typedef enum
77 {
78   TIFE_200KHZ=0,
79   TIFE_300KHZ=1,
80   TIFE_600KHZ=2,
81   TIFE_1536KHZ=3,
82   TIFE_5MHZ=4,
83   TIFE_6MHZ=5,
84   TIFE_7MHZ=6,
85   TIFE_8MHZ=7
86 } TUNERIFFILTERENUM;
87 
88 
89 
90