1 /*
2  *  Hamlib WiNRADiO backend - WR3500 description
3  *  Copyright (c) 2001-2004 by Stephane Fillod
4  *
5  *
6  *   This library is free software; you can redistribute it and/or
7  *   modify it under the terms of the GNU Lesser General Public
8  *   License as published by the Free Software Foundation; either
9  *   version 2.1 of the License, or (at your option) any later version.
10  *
11  *   This library is distributed in the hope that it will be useful,
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *   Lesser General Public License for more details.
15  *
16  *   You should have received a copy of the GNU Lesser General Public
17  *   License along with this library; if not, write to the Free Software
18  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21 
22 #include <stdlib.h>
23 
24 #include <hamlib/rig.h>
25 #include "winradio.h"
26 
27 
28 #ifdef WINRADIO_IOCTL
29 /*
30  * Winradio rigs capabilities.
31  */
32 
33 #define WR3500_FUNC  RIG_FUNC_FAGC
34 #define WR3500_SET_LEVEL (RIG_LEVEL_ATT | RIG_LEVEL_AF | RIG_LEVEL_IF | RIG_LEVEL_RF)
35 #define WR3500_LEVEL (WR3500_SET_LEVEL | RIG_LEVEL_STRENGTH)
36 
37 #define WR3500_MODES (RIG_MODE_AM | RIG_MODE_CW | \
38                      RIG_MODE_USB | RIG_MODE_LSB | RIG_MODE_FM)
39 
40 const struct rig_caps wr3500_caps =
41 {
42     RIG_MODEL(RIG_MODEL_WR3500),
43     .model_name =     "WR-3500",
44     .mfg_name =       "Winradio",
45     .version =        BACKEND_VER ".0",
46     .copyright =   "LGPL",
47     .status =         RIG_STATUS_UNTESTED,
48     .rig_type =       RIG_TYPE_PCRECEIVER,
49     .port_type =      RIG_PORT_DEVICE,
50     .targetable_vfo =      0,
51     .ptt_type =       RIG_PTT_NONE,
52     .dcd_type =       RIG_DCD_NONE,
53     .has_get_func =   WR3500_FUNC,
54     .has_set_func =   WR3500_FUNC,
55     .has_get_level =  WR3500_LEVEL,
56     .has_set_level =  WR3500_SET_LEVEL,
57     .has_get_parm =    RIG_PARM_NONE,
58     .has_set_parm =    RIG_PARM_NONE,
59     .ctcss_list =      NULL,
60     .dcs_list =        NULL,
61     .chan_list =   { RIG_CHAN_END, },
62     .transceive =     RIG_TRN_OFF,
63     .max_ifshift =     kHz(2),
64     .attenuator =     { 20, RIG_DBLST_END, },
65     .rx_range_list1 =  { {
66             .startf = kHz(150), .endf = GHz(2.6), .modes = WR3500_MODES,
67             .low_power = -1, .high_power = -1, .vfo = RIG_VFO_A
68         },
69         {
70             .startf = MHz(30), .endf = GHz(2.6), .modes = RIG_MODE_WFM,
71             .low_power = -1, .high_power = -1, .vfo = RIG_VFO_A
72         },
73         RIG_FRNG_END,
74     },
75     .rx_range_list2 =  { {
76             .startf = kHz(150), .endf = MHz(824), .modes = WR3500_MODES,
77             .low_power = -1, .high_power = -1, .vfo = RIG_VFO_A
78         },
79         {
80             .startf = MHz(30), .endf = MHz(824), .modes = RIG_MODE_WFM,
81             .low_power = -1, .high_power = -1, .vfo = RIG_VFO_A
82         },
83         {
84             .startf = MHz(849), .endf = MHz(869),
85             .modes = WR3500_MODES | RIG_MODE_WFM,
86             .low_power = -1, .high_power = -1, .vfo = RIG_VFO_A
87         },
88         {
89             .startf = MHz(894), .endf = GHz(2.6),
90             .modes = WR3500_MODES | RIG_MODE_WFM,
91             .low_power = -1, .high_power = -1, .vfo = RIG_VFO_A
92         },
93         RIG_FRNG_END,
94     },
95     .tx_range_list2 =  { RIG_FRNG_END, },
96 
97     .tuning_steps =  { {RIG_MODE_SSB | RIG_MODE_CW, 1},
98         {RIG_MODE_AM | RIG_MODE_FM | RIG_MODE_WFM, 10}, RIG_TS_END,
99     },
100 
101     .filters =       { {RIG_MODE_SSB | RIG_MODE_CW, kHz(2.5)},
102         {RIG_MODE_AM, kHz(6)},
103         {RIG_MODE_FM, kHz(15)},
104         {RIG_MODE_FM, kHz(6)},
105         {RIG_MODE_FM, kHz(50)},
106         {RIG_MODE_WFM, kHz(230)},
107         RIG_FLT_END,
108     },
109 
110     .priv =           NULL,   /* priv */
111 
112     .rig_init =     wr_rig_init,
113 
114     .set_freq =     wr_set_freq,
115     .get_freq =     wr_get_freq,
116     .set_mode =     wr_set_mode,
117     .get_mode =     wr_get_mode,
118 
119     .set_powerstat =   wr_set_powerstat,
120     .get_powerstat =   wr_get_powerstat,
121     .set_level =     wr_set_level,
122     .get_level =     wr_get_level,
123     .set_func =      wr_set_func,
124     .get_func =      wr_get_func,
125 
126     .get_info =      wr_get_info,
127 };
128 
129 #endif  /* WINRADIO_IOCTL */
130