2001-07-14 16:45:40 +00:00
|
|
|
/*
|
2002-01-06 17:50:56 +00:00
|
|
|
* Hamlib TenTenc backend - RX-320 PC-Radio description
|
2004-06-14 21:12:14 +00:00
|
|
|
* Copyright (c) 2001-2004 by Stephane Fillod
|
2001-07-14 16:45:40 +00:00
|
|
|
*
|
2006-01-09 21:14:40 +00:00
|
|
|
* $Id: rx320.c,v 1.8 2006-01-09 21:14:40 fillods Exp $
|
2001-07-14 16:45:40 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* a bit coarse, but I don't have a RX320, and the manual is not
|
|
|
|
* verbose on the subject. Please test it and report! --SF
|
|
|
|
*/
|
|
|
|
#define RX320_STR_CAL { 2, { \
|
|
|
|
{ 0, -60 }, \
|
|
|
|
{ 10000, 20 }, \
|
|
|
|
} }
|
|
|
|
|
|
|
|
/*
|
|
|
|
* rx320 receiver capabilities.
|
|
|
|
*
|
|
|
|
* protocol is documented at
|
|
|
|
* 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",
|
2006-01-09 21:14:40 +00:00
|
|
|
.version = "0.3",
|
2002-08-16 17:43:02 +00:00
|
|
|
.copyright = "LGPL",
|
2006-01-09 21:14:40 +00:00
|
|
|
.status = RIG_STATUS_BETA,
|
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,
|
|
|
|
|
|
|
|
.has_get_func = RIG_FUNC_NONE,
|
|
|
|
.has_set_func = RIG_FUNC_NONE,
|
|
|
|
.has_get_level = RX320_LEVELS,
|
|
|
|
.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 } },
|
2004-06-14 21:12:14 +00:00
|
|
|
[LVL_AF] = { .step = { .f = 1.0/64 } },
|
2006-01-09 21:14:40 +00:00
|
|
|
[LVL_IF] = { .min = { .i = -2000 }, .max = { .i = 2000 }, .step = { .i = 10} },
|
|
|
|
[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,
|
|
|
|
},
|
|
|
|
|
2002-08-16 17:43:02 +00:00
|
|
|
.rx_range_list1 = { RIG_FRNG_END, }, /* FIXME: enter region 1 setting */
|
|
|
|
.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
|
|
|
|
*/
|
|
|
|
|