2001-03-02 18:30:45 +00:00
|
|
|
/*
|
2001-07-13 19:08:15 +00:00
|
|
|
* Hamlib PCR backend - PCR-1000 description
|
2003-10-01 19:32:04 +00:00
|
|
|
* Copyright (c) 2001-2003 by Stephane Fillod and Darren Hatcher
|
2001-03-02 18:30:45 +00:00
|
|
|
*
|
2005-04-03 20:23:19 +00:00
|
|
|
* $Id: pcr1000.c,v 1.10 2005-04-03 20:18:30 fillods Exp $
|
2001-03-02 18:30:45 +00:00
|
|
|
*
|
2001-07-13 19:08:15 +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.
|
2001-03-02 18:30:45 +00:00
|
|
|
*
|
2001-07-13 19:08:15 +00:00
|
|
|
* 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.
|
2001-03-02 18:30:45 +00:00
|
|
|
*
|
2001-07-13 19:08:15 +00:00
|
|
|
* 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.
|
2001-03-02 18:30:45 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2001-07-13 19:08:15 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-10-01 19:32:04 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2001-03-02 18:30:45 +00:00
|
|
|
#include <hamlib/rig.h>
|
|
|
|
|
|
|
|
#include "pcr.h"
|
|
|
|
|
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
/* used in pcr_set_mode */
|
2002-03-07 22:50:43 +00:00
|
|
|
#define PCR1000_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_WFM)
|
2001-03-02 18:30:45 +00:00
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
/* used in pcr_set_func */
|
|
|
|
#define PCR1000_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_NR)
|
2001-03-02 18:30:45 +00:00
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
/* used in pcr_set_level */
|
|
|
|
#define PCR1000_LEVEL (RIG_LEVEL_ATT | RIG_LEVEL_AF | RIG_LEVEL_SQL | RIG_LEVEL_IF | \
|
|
|
|
RIG_LEVEL_AGC | RIG_LEVEL_NR)
|
2001-03-02 18:30:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* IC PCR1000 rigs capabilities.
|
|
|
|
*/
|
|
|
|
const struct rig_caps pcr1000_caps = {
|
2002-08-26 22:33:52 +00:00
|
|
|
.rig_model = RIG_MODEL_PCR1000,
|
2002-08-16 17:43:02 +00:00
|
|
|
.model_name = "IC-PCR1000",
|
2002-08-26 22:33:52 +00:00
|
|
|
.mfg_name = "Icom",
|
2005-04-03 20:23:19 +00:00
|
|
|
.version = BACKEND_VER,
|
2002-08-26 22:33:52 +00:00
|
|
|
.copyright = "LGPL",
|
|
|
|
.status = RIG_STATUS_ALPHA,
|
|
|
|
.rig_type = RIG_TYPE_PCRECEIVER,
|
|
|
|
.ptt_type = RIG_PTT_NONE,
|
|
|
|
.dcd_type = RIG_DCD_RIG,
|
|
|
|
.port_type = RIG_PORT_SERIAL,
|
|
|
|
.serial_rate_min = 300,
|
|
|
|
.serial_rate_max = 38400,
|
|
|
|
.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 = 1000,
|
|
|
|
.retry = 3,
|
|
|
|
|
|
|
|
.has_get_func = PCR1000_FUNC,
|
|
|
|
.has_set_func = PCR1000_FUNC,
|
|
|
|
.has_get_level = PCR1000_LEVEL,
|
|
|
|
.has_set_level = RIG_LEVEL_SET(PCR1000_LEVEL),
|
|
|
|
.has_get_parm = RIG_PARM_NONE,
|
|
|
|
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
|
|
|
|
.level_gran = {}, /* FIXME: granularity */
|
|
|
|
.parm_gran = {},
|
|
|
|
.ctcss_list = pcr1_ctcss_list,
|
|
|
|
.dcs_list = NULL,
|
|
|
|
.preamp = { RIG_DBLST_END, },
|
|
|
|
.attenuator = { 20, RIG_DBLST_END, },
|
|
|
|
.max_rit = Hz(0),
|
|
|
|
.max_xit = Hz(0),
|
|
|
|
.max_ifshift = Hz(1.2),
|
|
|
|
.targetable_vfo = 0,
|
|
|
|
.transceive = RIG_TRN_RIG,
|
|
|
|
.bank_qty = 0,
|
|
|
|
.chan_desc_sz = 0,
|
|
|
|
|
|
|
|
.chan_list = { RIG_CHAN_END, }, /* no memory channel list: this is a PC receiver */
|
|
|
|
|
|
|
|
.rx_range_list1 = { {kHz(10),GHz(1.3),PCR1000_MODES,-1,-1,RIG_VFO_A},
|
2001-06-02 17:53:18 +00:00
|
|
|
RIG_FRNG_END, },
|
2002-08-26 22:33:52 +00:00
|
|
|
.tx_range_list1 = { RIG_FRNG_END, },
|
|
|
|
.rx_range_list2 = { {kHz(10),MHz(824)-10,PCR1000_MODES,-1,-1,RIG_VFO_A},
|
2001-05-04 22:37:35 +00:00
|
|
|
{MHz(849)+10,MHz(869)-10,PCR1000_MODES,-1,-1,RIG_VFO_A},
|
2001-06-02 17:53:18 +00:00
|
|
|
{MHz(894)+10,GHz(1.3),PCR1000_MODES,-1,-1,RIG_VFO_A},
|
2001-03-02 18:30:45 +00:00
|
|
|
RIG_FRNG_END, },
|
2002-08-26 22:33:52 +00:00
|
|
|
.tx_range_list2 = { RIG_FRNG_END, }, /* no TX ranges, this is a receiver */
|
2001-03-02 18:30:45 +00:00
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
.tuning_steps = {
|
2001-05-04 22:37:35 +00:00
|
|
|
{ PCR1000_MODES,Hz(1) },
|
2001-03-02 18:30:45 +00:00
|
|
|
RIG_TS_END,
|
|
|
|
},
|
|
|
|
/* mode/filter list, remember: order matters! */
|
2002-08-26 22:33:52 +00:00
|
|
|
.filters = {
|
2001-03-02 18:30:45 +00:00
|
|
|
{RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB|RIG_MODE_AM, kHz(2.8)},
|
|
|
|
{RIG_MODE_FM|RIG_MODE_AM, kHz(6)},
|
|
|
|
{RIG_MODE_FM|RIG_MODE_AM, kHz(15)},
|
|
|
|
{RIG_MODE_WFM|RIG_MODE_FM|RIG_MODE_AM, kHz(50)},
|
|
|
|
{RIG_MODE_WFM, kHz(230)},
|
|
|
|
RIG_FLT_END,
|
|
|
|
},
|
2002-08-26 22:33:52 +00:00
|
|
|
.priv = NULL, /* priv */
|
2001-03-02 18:30:45 +00:00
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
.rig_init = pcr_init,
|
|
|
|
.rig_cleanup = pcr_cleanup,
|
|
|
|
.rig_open = pcr_open,
|
|
|
|
.rig_close = pcr_close,
|
2001-05-04 22:37:35 +00:00
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
.set_freq = pcr_set_freq,
|
|
|
|
.get_freq = pcr_get_freq,
|
|
|
|
.set_mode = pcr_set_mode,
|
|
|
|
.get_mode = pcr_get_mode,
|
2001-05-04 22:37:35 +00:00
|
|
|
|
2002-08-26 22:33:52 +00:00
|
|
|
.get_info = pcr_get_info,
|
|
|
|
|
|
|
|
.set_level = pcr_set_level,
|
|
|
|
.get_level = pcr_get_level,
|
|
|
|
.set_func = pcr_set_func,
|
|
|
|
.get_func = pcr_get_func,
|
2001-03-02 18:30:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO:
|
|
|
|
* set_trn, set_powerstat,
|
2002-08-26 22:33:52 +00:00
|
|
|
* set_level ATT?
|
|
|
|
* set_func: NB,TSQL, VSC?
|
2001-03-02 18:30:45 +00:00
|
|
|
* get_level, get_dcd, dtmf, ..
|
|
|
|
* decode_event, set_ctcss, set_ctcss_sql
|
|
|
|
* and also all the associated get_ functions.
|
|
|
|
*/
|
|
|
|
};
|
|
|
|
|