Added IC-910 rig.

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@979 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.3
Francois Retief 2002-02-28 10:59:46 +00:00
rodzic ce5e6a57c7
commit 468384fc68
6 zmienionych plików z 387 dodań i 87 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
ICOMSRCLIST = ic706.c icr8500.c ic735.c ic775.c ic756.c icall.c \
ic275.c ic475.c ic821h.c icr7000.c
ic275.c ic475.c ic821h.c icr7000.c ic910.c
lib_LTLIBRARIES = libhamlib-icom.la
libhamlib_icom_la_SOURCES = $(ICOMSRCLIST) icom.c frame.c

Wyświetl plik

@ -104,7 +104,7 @@ hamlibdocdir = @hamlibdocdir@
install_sh = @install_sh@
ICOMSRCLIST = ic706.c icr8500.c ic735.c ic775.c ic756.c icall.c \
ic275.c ic475.c ic821h.c icr7000.c
ic275.c ic475.c ic821h.c icr7000.c ic910.c
lib_LTLIBRARIES = libhamlib-icom.la
@ -122,7 +122,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libhamlib_icom_la_DEPENDENCIES = ../src/libhamlib.la
am_libhamlib_icom_la_OBJECTS = ic706.lo icr8500.lo ic735.lo ic775.lo \
ic756.lo icall.lo ic275.lo ic475.lo ic821h.lo icr7000.lo \
icom.lo frame.lo
ic910.lo icom.lo frame.lo
libhamlib_icom_la_OBJECTS = $(am_libhamlib_icom_la_OBJECTS)
DEFS = @DEFS@
@ -135,8 +135,9 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
@AMDEP_TRUE@ $(DEPDIR)/ic475.Plo $(DEPDIR)/ic706.Plo \
@AMDEP_TRUE@ $(DEPDIR)/ic735.Plo $(DEPDIR)/ic756.Plo \
@AMDEP_TRUE@ $(DEPDIR)/ic775.Plo $(DEPDIR)/ic821h.Plo \
@AMDEP_TRUE@ $(DEPDIR)/icall.Plo $(DEPDIR)/icom.Plo \
@AMDEP_TRUE@ $(DEPDIR)/icr7000.Plo $(DEPDIR)/icr8500.Plo
@AMDEP_TRUE@ $(DEPDIR)/ic910.Plo $(DEPDIR)/icall.Plo \
@AMDEP_TRUE@ $(DEPDIR)/icom.Plo $(DEPDIR)/icr7000.Plo \
@AMDEP_TRUE@ $(DEPDIR)/icr8500.Plo
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
@ -207,6 +208,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ic756.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ic775.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ic821h.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ic910.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/icall.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/icom.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/icr7000.Plo@am__quote@

217
icom/ic910.c 100644
Wyświetl plik

@ -0,0 +1,217 @@
/*
* Hamlib CI-V backend - description of IC-910 (VHF/UHF All-Mode Tranceiver)
* Contributed by Francois Retief <fgretief@sun.ac.za>
* Copyright (c) 2000,2001 by Stephane Fillod
*
* $Id: ic910.c,v 1.1 2002-02-28 10:59:46 fgretief Exp $
*
* 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
#include <hamlib/rig.h>
#include "icom.h"
int ic910_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
/* FIX: The IC-910 has "Set FM" = 4, which is RTTY in for other radios */
if (mode == RIG_MODE_FM) {
mode = RIG_MODE_RTTY;
}
return icom_set_mode(rig, vfo, mode, width);
}
int ic910_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
{
/* FIX: The IC-910 has "Set FM" = 4, which is RTTY in for other radios */
int retval = icom_get_mode(rig, vfo, mode, width);
if (*mode == RIG_MODE_RTTY) {
*mode = RIG_MODE_FM;
}
return retval;
}
#define IC910_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_FM)
#define IC910_VFO_ALL (RIG_VFO_A|RIG_VFO_C)
#define IC910_SCAN_OPS (RIG_SCAN_MEM)
#define IC910_VFO_OPS (RIG_OP_FROM_VFO| \
RIG_OP_TO_VFO| \
RIG_OP_CPY| \
RIG_OP_MCL)
#define IC910_FUNC_ALL (RIG_FUNC_FAGC| \
RIG_FUNC_NB| \
RIG_FUNC_NR| \
RIG_FUNC_ANF| \
RIG_FUNC_TONE| \
RIG_FUNC_TSQL| \
RIG_FUNC_COMP| \
RIG_FUNC_VOX| \
RIG_FUNC_FBKIN| \
RIG_FUNC_AFC| \
RIG_FUNC_SATMODE| \
RIG_FUNC_SCOPE)
#define IC910_LEVEL_ALL (RIG_LEVEL_AF| \
RIG_LEVEL_RF| \
RIG_LEVEL_SQL| \
RIG_LEVEL_IF| \
RIG_LEVEL_NR| \
RIG_LEVEL_CWPITCH| \
RIG_LEVEL_RFPOWER| \
RIG_LEVEL_MICGAIN| \
RIG_LEVEL_KEYSPD| \
RIG_LEVEL_COMP| \
RIG_LEVEL_VOXGAIN| \
RIG_LEVEL_VOXDELAY| \
RIG_LEVEL_ANTIVOX| \
RIG_LEVEL_ATT)
#define IC910_STR_CAL { 0, { } }
/*
*/
static const struct icom_priv_caps ic910_priv_caps = {
0x60, /* default address */
1, /* 731 mode */
ic910_ts_sc_list,
IC910_STR_CAL
};
const struct rig_caps ic910_caps = {
rig_model: RIG_MODEL_IC910,
model_name:"IC-910",
mfg_name: "Icom",
version: "0.1",
copyright: "LGPL",
status: RIG_STATUS_ALPHA,
rig_type: RIG_TYPE_TRANSCEIVER,
ptt_type: RIG_PTT_NONE,
dcd_type: RIG_DCD_NONE,
port_type: RIG_PORT_SERIAL,
serial_rate_min: 300,
serial_rate_max: 19200,
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: IC910_FUNC_ALL,
has_set_func: IC910_FUNC_ALL,
has_get_level: IC910_LEVEL_ALL | (RIG_LEVEL_SQLSTAT|RIG_LEVEL_STRENGTH),
has_set_level: IC910_LEVEL_ALL,
has_get_parm: RIG_PARM_NONE,
has_set_parm: RIG_PARM_NONE,
level_gran: {},
parm_gran: {},
ctcss_list: NULL,
dcs_list: NULL,
preamp: { RIG_DBLST_END, },
attenuator: { RIG_DBLST_END, },
max_rit: Hz(0), /* SSB,CW: +-1.0kHz FM: +-5.0kHz */
max_xit: Hz(0),
max_ifshift: Hz(0), /* 1.2kHz manual knob */
targetable_vfo: 0,
vfo_ops: IC910_VFO_OPS,
scan_ops: IC910_SCAN_OPS,
transceive: RIG_TRN_RIG,
bank_qty: 0,
chan_desc_sz: 0,
chan_list: {
{ 1, 99, RIG_MTYPE_MEM, 0 },
{ 100, 105, RIG_MTYPE_EDGE, 0 },
{ 106, 106, RIG_MTYPE_CALL, 0 },
RIG_CHAN_END, },
rx_range_list1: { /* USA */
{MHz(144),MHz(148),IC910_MODES,-1,-1,IC910_VFO_ALL},
{MHz(430),MHz(450),IC910_MODES,-1,-1,IC910_VFO_ALL},
RIG_FRNG_END, },
tx_range_list1: {
{MHz(144),MHz(148),IC910_MODES,W(5),W(100),IC910_VFO_ALL},
{MHz(430),MHz(450),IC910_MODES,W(5),W(75),IC910_VFO_ALL},
RIG_FRNG_END, },
rx_range_list2: { /* Europe */
{MHz(144),MHz(146),IC910_MODES,-1,-1,IC910_VFO_ALL},
{MHz(430),MHz(440),IC910_MODES,-1,-1,IC910_VFO_ALL},
RIG_FRNG_END, },
tx_range_list2: {
{MHz(144),MHz(146),IC910_MODES,W(5),W(100),IC910_VFO_ALL},
{MHz(430),MHz(440),IC910_MODES,W(5),W(75),IC910_VFO_ALL},
RIG_FRNG_END, },
tuning_steps: {
{RIG_MODE_SSB|RIG_MODE_CW,1},
{RIG_MODE_SSB|RIG_MODE_CW,10},
{RIG_MODE_SSB|RIG_MODE_CW,50},
{RIG_MODE_SSB|RIG_MODE_CW,100},
{RIG_MODE_FM,kHz(0.1)},
{RIG_MODE_FM,kHz(5)},
{RIG_MODE_FM,kHz(6.25)},
{RIG_MODE_FM,kHz(10)},
{RIG_MODE_FM,kHz(12.5)},
{RIG_MODE_FM,kHz(20)},
{RIG_MODE_FM,kHz(25)},
{RIG_MODE_FM,kHz(100)},
RIG_TS_END, },
/* mode/filter list, remember: order matters! */
filters: {
{RIG_MODE_CW|RIG_MODE_SSB, kHz(2.3)}, /* buildin */
{RIG_MODE_FM, kHz(15)}, /* buildin */
RIG_FLT_END, },
priv: (void*)&ic910_priv_caps,
rig_init: icom_init,
rig_cleanup: icom_cleanup,
rig_open: NULL,
rig_close: NULL,
cfgparams: icom_cfg_params,
set_conf: icom_set_conf,
get_conf: icom_get_conf,
get_freq: icom_get_freq,
set_freq: icom_set_freq,
get_mode: ic910_get_mode,
set_mode: ic910_set_mode,
get_vfo: NULL,
set_vfo: icom_set_vfo,
get_ts: icom_get_ts,
set_ts: icom_set_ts,
get_channel: icom_get_channel,
set_channel: icom_set_channel,
get_func: icom_get_func,
set_func: icom_set_func,
get_level: icom_get_level,
set_level: icom_set_level,
set_mem: icom_set_mem,
vfo_op: icom_vfo_op,
scan: icom_scan,
decode_event: icom_decode_event,
};
/* end of file */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib CI-V backend - main file
* Copyright (c) 2000,2001,2002 by Stephane Fillod
*
* $Id: icom.c,v 1.50 2002-02-27 23:17:17 fillods Exp $
* $Id: icom.c,v 1.51 2002-02-28 10:59:46 fgretief Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -156,7 +156,21 @@ const struct ts_sc_list ic706_ts_sc_list[] = {
{ 0, 0 },
};
const struct ts_sc_list ic910_ts_sc_list[] = {
{ Hz(1), 0x00 },
{ Hz(10), 0x01 },
{ Hz(50), 0x02 },
{ Hz(100), 0x03 },
{ kHz(1), 0x04 },
{ kHz(5), 0x05 },
{ kHz(6.25), 0x06 },
{ kHz(10), 0x07 },
{ kHz(12.5), 0x08 },
{ kHz(20), 0x09 },
{ kHz(25), 0x10 },
{ kHz(100), 0x11 },
{ 0, 0 },
};
struct icom_addr {
rig_model_t model;
@ -645,7 +659,18 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
lvl_cn = C_CTL_LVL;
lvl_sc = S_LVL_BALANCE;
break;
case RIG_LEVEL_VOXGAIN: /* IC-910H */
lvl_cn = C_CTL_MEM;
lvl_sc = S_MEM_VOXGAIN;
break;
case RIG_LEVEL_VOXDELAY: /* IC-910H */
lvl_cn = C_CTL_MEM;
lvl_sc = S_MEM_VOXDELAY;
break;
case RIG_LEVEL_ANTIVOX: /* IC-910H */
lvl_cn = C_CTL_MEM;
lvl_sc = S_MEM_ANTIVOX;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported set_level %d", level);
return -RIG_EINVAL;
@ -773,7 +798,18 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
lvl_cn = C_CTL_LVL;
lvl_sc = S_LVL_BALANCE;
break;
case RIG_LEVEL_VOXGAIN: /* IC-910H */
lvl_cn = C_CTL_MEM;
lvl_sc = S_MEM_VOXGAIN;
break;
case RIG_LEVEL_VOXDELAY: /* IC-910H */
lvl_cn = C_CTL_MEM;
lvl_sc = S_MEM_VOXDELAY;
break;
case RIG_LEVEL_ANTIVOX: /* IC-910H */
lvl_cn = C_CTL_MEM;
lvl_sc = S_MEM_ANTIVOX;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported get_level %d", level);
return -RIG_EINVAL;
@ -1507,7 +1543,18 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
fct_cn = C_CTL_FUNC;
fct_sc = S_FUNC_RNF;
break;
case RIG_FUNC_AFC: /* IC-910H */
fct_cn = C_CTL_FUNC;
fct_sc = S_FUNC_AFC;
break;
case RIG_FUNC_SATMODE: /* IC-910H */
fct_cn = C_CTL_MEM;
fct_sc = S_MEM_SATMODE;
break;
case RIG_FUNC_SCOPE: /* IC-910H */
fct_cn = C_CTL_MEM;
fct_sc = S_MEM_BANDSCOPE;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported set_func %d", func);
return -RIG_EINVAL;
@ -1595,7 +1642,18 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
fct_cn = C_CTL_FUNC;
fct_sc = S_FUNC_RNF;
break;
case RIG_FUNC_AFC: /* IC-910H */
fct_cn = C_CTL_FUNC;
fct_sc = S_FUNC_AFC;
break;
case RIG_FUNC_SATMODE: /* IC-910H */
fct_cn = C_CTL_MEM;
fct_sc = S_MEM_SATMODE;
break;
case RIG_FUNC_SCOPE: /* IC-910H */
fct_cn = C_CTL_MEM;
fct_sc = S_MEM_BANDSCOPE;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported get_func %d", func);
return -RIG_EINVAL;
@ -2150,6 +2208,12 @@ int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
case RIG_SCAN_DELTA:
scan_sc = S_SCAN_DELTA; /* TODO: delta-f support */
break;
case RIG_SCAN_RESUME_ON:
scan_sc = S_SCAN_RSMON;
break;
case RIG_SCAN_RESUME_OFF:
scan_sc = S_SCAN_RSMOFF;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported scan %#x", scan);
return -RIG_EINVAL;
@ -2333,6 +2397,7 @@ int initrigs_icom(void *be_handle)
rig_register(&ic756pro_caps);
rig_register(&ic821h_caps);
rig_register(&ic910_caps);
rig_register(&icr7000_caps);
rig_register(&icr8500_caps);

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib CI-V backend - main header
* Copyright (c) 2000,2001,2002 by Stephane Fillod
*
* $Id: icom.h,v 1.38 2002-02-27 23:17:17 fillods Exp $
* $Id: icom.h,v 1.39 2002-02-28 10:59:46 fgretief Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -63,6 +63,7 @@ extern const struct ts_sc_list r9000_ts_sc_list[];
extern const struct ts_sc_list ic756_ts_sc_list[];
extern const struct ts_sc_list ic756pro_ts_sc_list[];
extern const struct ts_sc_list ic706_ts_sc_list[];
extern const struct ts_sc_list ic910_ts_sc_list[];
int icom_init(RIG *rig);
int icom_cleanup(RIG *rig);
@ -116,6 +117,7 @@ extern const struct rig_caps ic756_caps;
extern const struct rig_caps ic756pro_caps;
extern const struct rig_caps ic775_caps;
extern const struct rig_caps ic821h_caps;
extern const struct rig_caps ic910_caps;
extern const struct rig_caps icr7000_caps;
extern const struct rig_caps icr8500_caps;
extern const struct rig_caps icall_caps;

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib CI-V backend - defines for the ICOM "CI-V" interface.
* Copyright (c) 2000,2001 by Stephane Fillod
*
* $Id: icom_defs.h,v 1.11 2001-07-13 19:08:15 f4cfe Exp $
* $Id: icom_defs.h,v 1.12 2002-02-28 10:59:46 fgretief Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -137,6 +137,8 @@
#define S_SCAN_SLCTN 0x23 /* Selected number memory scan */
#define S_SCAN_SLCTM 0x24 /* Selected mode memory scan */
#define S_SCAN_PRIO 0x42 /* Priority / window scan */
#define S_SCAN_RSMOFF 0xD0 /* Set scan resume OFF */
#define S_SCAN_RSMON 0xD3 /* Set scan resume ON */
/*
@ -179,6 +181,7 @@
*/
#define S_ANN_ALL 0x00 /* Announce all */
#define S_ANN_FREQ 0x01 /* Announce freq */
#define S_ANN_MODE 0x02 /* Announce operating mode */
/*
* Function settings (C_CTL_LVL) subcommands
@ -229,6 +232,7 @@
#define S_FUNC_BKIN 0x47 /* BK-IN setting */
#define S_FUNC_MN 0x48 /* Manual notch setting */
#define S_FUNC_RNF 0x49 /* RTTY Filter Notch setting */
#define S_FUNC_AFC 0x4A /* Auto Frequency Control (AFC) setting */
/*
* Transceiver ID (C_RD_TRXID) subcommands
@ -252,6 +256,16 @@
*/
#define S_MEM_CNTNT 0x00
#define S_MEM_CNTNT_SLCT 0x01
/* For IC-910H rig. */
#define S_MEM_RDWR_MEM 0x00 /* Read/write memory channel */
#define S_MEM_SATMEM 0x01 /* Satellite memory */
#define S_MEM_VOXGAIN 0x02 /* VOX gain level (0=0%, 255=100%) */
#define S_MEM_VOXDELAY 0x03 /* VOX delay (0=0.0 sec, 20=2.0 sec) */
#define S_MEM_ANTIVOX 0x04 /* anti VOX setting */
#define S_MEM_ATTLEVEL 0x05 /* Attenuation level (0=0%, 255=100%) */
#define S_MEM_RIT 0x06 /* RIT (0=off, 1=on, 2=sub dial) */
#define S_MEM_SATMODE 0x07 /* Satellite mode (on/off) */
#define S_MEM_BANDSCOPE 0x08 /* Simple bandscope (on/off) */
/*
* Tone control (C_SET_TONE) subcommands