2001-07-14 16:45:40 +00:00
|
|
|
/*
|
2002-01-06 17:50:56 +00:00
|
|
|
* Hamlib TenTenc backend - RX-320 PC-Radio description
|
2008-12-03 22:36:34 +00:00
|
|
|
* Copyright (c) 2001-2008 by Stephane Fillod
|
2001-07-14 16:45:40 +00:00
|
|
|
*
|
|
|
|
*
|
2011-08-22 01:22:00 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2001-07-14 16:45:40 +00:00
|
|
|
*
|
2011-08-22 01:22:00 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2001-07-14 16:45:40 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-08-22 01:22:00 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-07-14 16:45:40 +00:00
|
|
|
*
|
2011-08-22 01:22:00 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2001-07-14 16:45:40 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2011-08-22 01:22:00 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-07-14 16:45:40 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-10-01 19:32:04 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2001-07-14 16:45:40 +00:00
|
|
|
#include <hamlib/rig.h>
|
2003-11-16 17:14:44 +00:00
|
|
|
#include "idx_builtin.h"
|
2001-07-14 16:45:40 +00:00
|
|
|
#include "tentec.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define RX320_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB)
|
|
|
|
|
2004-06-14 21:12:14 +00:00
|
|
|
/* TODO: LINEOUT */
|
2006-01-09 21:14:40 +00:00
|
|
|
#define RX320_LEVELS (RIG_LEVEL_AGC|RIG_LEVEL_AF|RIG_LEVEL_IF|RIG_LEVEL_RAWSTR|RIG_LEVEL_CWPITCH)
|
2001-07-14 16:45:40 +00:00
|
|
|
|
|
|
|
#define RX320_VFO (RIG_VFO_A)
|
|
|
|
|
2011-08-22 01:22:00 +00:00
|
|
|
/*
|
2008-12-03 22:36:34 +00:00
|
|
|
* Modified 11/18/2008, Josh Rovero, KK1D
|
2011-08-22 01:22:00 +00:00
|
|
|
* Calibration via comparison with JRC NRD-525.
|
2008-12-03 22:36:34 +00:00
|
|
|
* Highy non-linear....
|
2001-07-14 16:45:40 +00:00
|
|
|
*/
|
2009-11-02 21:26:54 +00:00
|
|
|
#define RX320_STR_CAL { 17, { \
|
|
|
|
{ 0, -60 }, \
|
|
|
|
{ 10, -50 }, \
|
|
|
|
{ 20, -40 }, \
|
|
|
|
{ 30, -30 }, \
|
|
|
|
{ 40, -20 }, \
|
|
|
|
{ 50, -15 }, \
|
|
|
|
{ 100, -10 }, \
|
|
|
|
{ 200, -5 }, \
|
|
|
|
{ 225, -3 }, \
|
|
|
|
{ 256, 0 }, \
|
|
|
|
{ 512, 1 }, \
|
|
|
|
{ 768, 3}, \
|
|
|
|
{ 1024, 4 }, \
|
|
|
|
{ 1280, 5 }, \
|
|
|
|
{ 2560, 10 }, \
|
|
|
|
{ 5120, 20 }, \
|
|
|
|
{ 10000, 30 }, \
|
|
|
|
} }
|
2001-07-14 16:45:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* rx320 receiver capabilities.
|
|
|
|
*
|
2011-08-22 01:22:00 +00:00
|
|
|
* protocol is documented at
|
2001-07-14 16:45:40 +00:00
|
|
|
* http://www.tentec.com/rx320prg.zip
|
|
|
|
*
|
|
|
|
* TODO:
|
|
|
|
*/
|
|
|
|
const struct rig_caps rx320_caps = {
|
2002-08-16 17:43:02 +00:00
|
|
|
.rig_model = RIG_MODEL_RX320,
|
|
|
|
.model_name = "RX-320",
|
|
|
|
.mfg_name = "Ten-Tec",
|
2009-11-01 22:15:58 +00:00
|
|
|
.version = "0.6",
|
2002-08-16 17:43:02 +00:00
|
|
|
.copyright = "LGPL",
|
2009-11-01 22:15:58 +00:00
|
|
|
.status = RIG_STATUS_STABLE,
|
2002-08-16 17:43:02 +00:00
|
|
|
.rig_type = RIG_TYPE_PCRECEIVER,
|
|
|
|
.ptt_type = RIG_PTT_NONE,
|
|
|
|
.dcd_type = RIG_DCD_NONE,
|
|
|
|
.port_type = RIG_PORT_SERIAL,
|
|
|
|
.serial_rate_min = 1200,
|
|
|
|
.serial_rate_max = 1200,
|
|
|
|
.serial_data_bits = 8,
|
|
|
|
.serial_stop_bits = 1,
|
|
|
|
.serial_parity = RIG_PARITY_NONE,
|
|
|
|
.serial_handshake = RIG_HANDSHAKE_NONE,
|
|
|
|
.write_delay = 0,
|
|
|
|
.post_write_delay = 0,
|
|
|
|
.timeout = 200,
|
|
|
|
.retry = 3,
|
|
|
|
|
2008-12-03 22:36:34 +00:00
|
|
|
/*
|
2011-08-22 01:22:00 +00:00
|
|
|
* Added S-meter read support, Josh Rovero KK1D
|
|
|
|
* Only get_level is for RIG_LEVEL_RAWSTR
|
2008-12-03 22:36:34 +00:00
|
|
|
*/
|
2002-08-16 17:43:02 +00:00
|
|
|
.has_get_func = RIG_FUNC_NONE,
|
|
|
|
.has_set_func = RIG_FUNC_NONE,
|
2009-11-01 22:15:58 +00:00
|
|
|
.has_get_level = RX320_LEVELS,
|
2002-08-16 17:43:02 +00:00
|
|
|
.has_set_level = RIG_LEVEL_SET(RX320_LEVELS),
|
|
|
|
.has_get_parm = RIG_PARM_NONE,
|
|
|
|
.has_set_parm = RIG_PARM_NONE,
|
2003-11-16 17:14:44 +00:00
|
|
|
.level_gran = {
|
2006-01-09 21:14:40 +00:00
|
|
|
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 10000 } },
|
2009-11-02 21:26:54 +00:00
|
|
|
[LVL_AF] = { .min = { .f = 0 }, .max = { .f = 1 }, .step = { .f = 1.0/64 } },
|
2011-08-22 01:22:00 +00:00
|
|
|
[LVL_IF] = { .min = { .i = -2000 }, .max = { .i = 2000 }, .step = { .i = 10} },
|
2006-01-09 21:14:40 +00:00
|
|
|
[LVL_CWPITCH] = { .min = { .i = 0}, .max = { .i = 2000 }, .step = { .i = 100} }
|
2003-11-16 17:14:44 +00:00
|
|
|
},
|
2002-08-16 17:43:02 +00:00
|
|
|
.parm_gran = {},
|
|
|
|
.ctcss_list = NULL,
|
|
|
|
.dcs_list = NULL,
|
|
|
|
.preamp = { RIG_DBLST_END },
|
|
|
|
.attenuator = { RIG_DBLST_END },
|
|
|
|
.max_rit = Hz(0),
|
|
|
|
.max_xit = Hz(0),
|
2006-01-09 21:14:40 +00:00
|
|
|
.max_ifshift = kHz(2),
|
2002-08-16 17:43:02 +00:00
|
|
|
.targetable_vfo = 0,
|
|
|
|
.transceive = RIG_TRN_OFF,
|
|
|
|
.bank_qty = 0,
|
|
|
|
.chan_desc_sz = 0,
|
|
|
|
|
|
|
|
.chan_list = {
|
2001-07-14 16:45:40 +00:00
|
|
|
RIG_CHAN_END,
|
|
|
|
},
|
|
|
|
|
2009-11-01 22:15:58 +00:00
|
|
|
.rx_range_list1 = {
|
|
|
|
{kHz(100),MHz(30),RX320_MODES,-1,-1,RX320_VFO},
|
|
|
|
RIG_FRNG_END,
|
|
|
|
},
|
2002-08-16 17:43:02 +00:00
|
|
|
.tx_range_list1 = { RIG_FRNG_END, },
|
|
|
|
.rx_range_list2 = {
|
2001-07-14 16:45:40 +00:00
|
|
|
{kHz(100),MHz(30),RX320_MODES,-1,-1,RX320_VFO},
|
|
|
|
RIG_FRNG_END,
|
|
|
|
},
|
2002-08-16 17:43:02 +00:00
|
|
|
.tx_range_list2 = { RIG_FRNG_END, },
|
|
|
|
.tuning_steps = {
|
2001-07-14 16:45:40 +00:00
|
|
|
{RX320_MODES,10}, /* FIXME: add other ts */
|
|
|
|
RIG_TS_END,
|
|
|
|
},
|
|
|
|
/* mode/filter list, remember: order matters! */
|
2002-08-16 17:43:02 +00:00
|
|
|
.filters = {
|
2006-01-09 21:14:40 +00:00
|
|
|
{RIG_MODE_CW, 300},
|
|
|
|
{RIG_MODE_CW, 450},
|
|
|
|
{RIG_MODE_CW, 600},
|
|
|
|
{RIG_MODE_CW, 750},
|
|
|
|
{RIG_MODE_CW, 900},
|
|
|
|
{RIG_MODE_CW, kHz(1.2)},
|
|
|
|
{RIG_MODE_SSB|RIG_MODE_CW, kHz(1.5)},
|
|
|
|
{RIG_MODE_SSB|RIG_MODE_CW, kHz(1.8)},
|
|
|
|
{RIG_MODE_SSB|RIG_MODE_CW, kHz(2.1)},
|
|
|
|
{RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_CW, kHz(2.4)},
|
|
|
|
{RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_CW, kHz(3.0)},
|
|
|
|
{RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_CW, kHz(4.2)},
|
|
|
|
{RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_CW, kHz(5.1)},
|
|
|
|
{RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_CW, kHz(6)},
|
|
|
|
{RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_CW, kHz(8)},
|
|
|
|
RIG_FLT_END,
|
2001-07-14 16:45:40 +00:00
|
|
|
},
|
2003-11-16 17:14:44 +00:00
|
|
|
.str_cal = RX320_STR_CAL,
|
2002-08-16 17:43:02 +00:00
|
|
|
|
|
|
|
.rig_init = tentec_init,
|
|
|
|
.rig_cleanup = tentec_cleanup,
|
|
|
|
.set_freq = tentec_set_freq,
|
|
|
|
.get_freq = tentec_get_freq,
|
|
|
|
.set_mode = tentec_set_mode,
|
|
|
|
.get_mode = tentec_get_mode,
|
|
|
|
.set_level = tentec_set_level,
|
|
|
|
.get_level = tentec_get_level,
|
|
|
|
.get_info = tentec_get_info,
|
2001-07-14 16:45:40 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Function definitions below
|
|
|
|
*/
|
|
|
|
|