2001-08-12 22:52:44 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Kachina backend - 505DSP description
|
2004-09-26 08:35:05 +00:00
|
|
|
* Copyright (c) 2001-2004 by Stephane Fillod
|
2001-08-12 22:52:44 +00:00
|
|
|
*
|
|
|
|
*
|
2011-08-21 01:58:49 +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-08-12 22:52:44 +00:00
|
|
|
*
|
2011-08-21 01:58:49 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2001-08-12 22:52:44 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-08-21 01:58:49 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-08-12 22:52:44 +00:00
|
|
|
*
|
2011-08-21 01:58:49 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2001-08-12 22:52:44 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2011-08-21 01:58:49 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-08-12 22:52:44 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-10-01 19:32:04 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2001-08-12 22:52:44 +00:00
|
|
|
#include <hamlib/rig.h>
|
|
|
|
#include "kachina.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define K505DSP_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
|
|
|
#define K505DSP_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
|
|
|
#define K505DSP_AM_TX_MODES RIG_MODE_AM
|
|
|
|
|
|
|
|
#define K505DSP_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_TONE|RIG_FUNC_COMP)
|
|
|
|
|
2004-11-15 18:51:37 +00:00
|
|
|
#define K505DSP_LEVEL_ALL (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_IF|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER|RIG_LEVEL_KEYSPD|RIG_LEVEL_BKINDL|RIG_LEVEL_CWPITCH)
|
2001-08-12 22:52:44 +00:00
|
|
|
|
|
|
|
#define K505DSP_PARM_ALL (RIG_PARM_NONE)
|
|
|
|
|
|
|
|
#define K505DSP_VFO (RIG_VFO_A)
|
|
|
|
|
2004-11-15 18:51:37 +00:00
|
|
|
#define dBm2S9(x) ((x)+73)
|
|
|
|
|
2001-08-12 22:52:44 +00:00
|
|
|
#define K505DSP_STR_CAL { 2, { \
|
2004-11-15 18:51:37 +00:00
|
|
|
{ 0, dBm2S9(-130) }, \
|
|
|
|
{ 127, dBm2S9(20) }, \
|
2001-08-12 22:52:44 +00:00
|
|
|
} }
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 505DSP rig capabilities.
|
|
|
|
*
|
2011-08-21 01:58:49 +00:00
|
|
|
* protocol is documented at
|
2001-08-12 22:52:44 +00:00
|
|
|
* http://www.kachina-az.com/develope.htm
|
|
|
|
*
|
|
|
|
* TODO:
|
|
|
|
* - so many ...
|
|
|
|
*/
|
|
|
|
const struct rig_caps k505dsp_caps = {
|
2002-08-16 17:43:02 +00:00
|
|
|
.rig_model = RIG_MODEL_505DSP,
|
|
|
|
.model_name = "505DSP",
|
|
|
|
.mfg_name = "Kachina",
|
2006-10-07 17:42:14 +00:00
|
|
|
.version = "0.3",
|
2002-08-16 17:43:02 +00:00
|
|
|
.copyright = "LGPL",
|
2004-09-26 08:35:05 +00:00
|
|
|
.status = RIG_STATUS_ALPHA,
|
2002-08-16 17:43:02 +00:00
|
|
|
.rig_type = RIG_TYPE_COMPUTER,
|
|
|
|
.ptt_type = RIG_PTT_NONE,
|
2004-09-26 08:35:05 +00:00
|
|
|
.dcd_type = RIG_DCD_RIG,
|
2002-08-16 17:43:02 +00:00
|
|
|
.port_type = RIG_PORT_SERIAL,
|
|
|
|
.serial_rate_min = 9600,
|
|
|
|
.serial_rate_max = 9600,
|
|
|
|
.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 = 2,
|
|
|
|
|
|
|
|
.has_get_func = K505DSP_FUNC,
|
|
|
|
.has_set_func = K505DSP_FUNC,
|
2004-11-15 18:51:37 +00:00
|
|
|
.has_get_level = RIG_LEVEL_RAWSTR,
|
2002-08-16 17:43:02 +00:00
|
|
|
.has_set_level = RIG_LEVEL_SET(K505DSP_LEVEL_ALL),
|
|
|
|
.has_get_parm = K505DSP_PARM_ALL,
|
|
|
|
.has_set_parm = RIG_PARM_SET(K505DSP_PARM_ALL),
|
|
|
|
.level_gran = {}, /* FIXME: granularity */
|
|
|
|
.parm_gran = {},
|
|
|
|
.ctcss_list = common_ctcss_list,
|
|
|
|
.dcs_list = NULL,
|
|
|
|
.preamp = { 10, RIG_DBLST_END },
|
|
|
|
.attenuator = { 20, RIG_DBLST_END },
|
|
|
|
.max_rit = Hz(9900),
|
|
|
|
.max_xit = Hz(0),
|
|
|
|
.max_ifshift = Hz(1270),
|
|
|
|
.targetable_vfo = 0,
|
|
|
|
.transceive = RIG_TRN_OFF,
|
|
|
|
.bank_qty = 0,
|
|
|
|
.chan_desc_sz = 0,
|
|
|
|
|
|
|
|
.chan_list = {
|
2001-08-12 22:52:44 +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-08-12 22:52:44 +00:00
|
|
|
{kHz(30),MHz(30),K505DSP_ALL_MODES,-1,-1,K505DSP_VFO},
|
|
|
|
RIG_FRNG_END,
|
|
|
|
},
|
2002-08-16 17:43:02 +00:00
|
|
|
.tx_range_list2 = {
|
2001-08-12 22:52:44 +00:00
|
|
|
{kHz(1800),MHz(2)-100,K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{kHz(1800),MHz(2)-100,K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{kHz(3500),MHz(4)-100,K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{kHz(3500),MHz(4)-100,K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{MHz(7),kHz(7300),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{MHz(7),kHz(7300),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{kHz(10100),kHz(10150),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{kHz(10100),kHz(10150),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{MHz(14),kHz(14350),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{MHz(14),kHz(14350),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{kHz(18068),kHz(18168),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{kHz(18068),kHz(18168),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{MHz(21),kHz(21450),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{MHz(21),kHz(21450),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{kHz(24895),kHz(24995),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{kHz(24895),kHz(24995),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
{MHz(28),kHz(29700),K505DSP_OTHER_TX_MODES,W(10),W(100),K505DSP_VFO},
|
|
|
|
{MHz(28),kHz(29700),K505DSP_AM_TX_MODES,W(4),W(25),K505DSP_VFO},
|
|
|
|
RIG_FRNG_END,
|
|
|
|
},
|
2002-08-16 17:43:02 +00:00
|
|
|
.tuning_steps = {
|
2001-08-12 22:52:44 +00:00
|
|
|
{K505DSP_ALL_MODES,1}, /* FIXME: add other ts */
|
|
|
|
RIG_TS_END,
|
|
|
|
},
|
|
|
|
/* mode/filter list, remember: order matters! */
|
2002-08-16 17:43:02 +00:00
|
|
|
.filters = {
|
2001-08-12 22:52:44 +00:00
|
|
|
{RIG_MODE_SSB, kHz(2.4)},
|
|
|
|
{RIG_MODE_SSB, kHz(2.7)},
|
|
|
|
{RIG_MODE_SSB, kHz(2.1)},
|
|
|
|
{RIG_MODE_SSB, kHz(3.5)},
|
|
|
|
{RIG_MODE_SSB, kHz(1.7)},
|
|
|
|
{RIG_MODE_CW, kHz(1)},
|
|
|
|
{RIG_MODE_CW, Hz(500)},
|
|
|
|
{RIG_MODE_CW, kHz(2.4)},
|
|
|
|
{RIG_MODE_CW, Hz(200)},
|
|
|
|
{RIG_MODE_CW, Hz(100)},
|
|
|
|
{RIG_MODE_AM, kHz(6)},
|
|
|
|
{RIG_MODE_FM, kHz(6)},
|
|
|
|
RIG_FLT_END,
|
|
|
|
},
|
2003-11-16 17:14:44 +00:00
|
|
|
.str_cal = K505DSP_STR_CAL,
|
2001-08-12 22:52:44 +00:00
|
|
|
|
2002-08-16 17:43:02 +00:00
|
|
|
.set_freq = kachina_set_freq,
|
|
|
|
.set_mode = kachina_set_mode,
|
2001-08-12 22:52:44 +00:00
|
|
|
|
2004-11-15 18:51:37 +00:00
|
|
|
.get_level = kachina_get_level,
|
|
|
|
|
2001-08-12 22:52:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Function definitions below
|
|
|
|
*/
|
|
|
|
|