From d216963eab3b1b90b2f91066a38e24e5fb77d763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Wed, 27 Feb 2002 23:17:57 +0000 Subject: [PATCH] Initial release git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@973 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- aor/ar5000.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++ icom/icr7000.c | 156 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 323 insertions(+) create mode 100644 aor/ar5000.c create mode 100644 icom/icr7000.c diff --git a/aor/ar5000.c b/aor/ar5000.c new file mode 100644 index 000000000..e022b1786 --- /dev/null +++ b/aor/ar5000.c @@ -0,0 +1,167 @@ +/* + * Hamlib AOR backend - AR5000 description + * Copyright (c) 2000-2002 by Stephane Fillod + * + * $Id: ar5000.c,v 1.1 2002-02-27 23:15:47 fillods 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 +#include "aor.h" + + +#define AR5000_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_WFM) + +#define AR5000_FUNC_ALL (RIG_FUNC_TSQL|RIG_FUNC_ABM) + +#define AR5000_LEVEL (RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_SQL|RIG_LEVEL_SQLSTAT|RIG_LEVEL_STRENGTH) + +#define AR5000_PARM (RIG_PARM_APO|RIG_PARM_BACKLIGHT|RIG_PARM_BEEP) + +#define AR5000_VFO_OPS (RIG_OP_MCL|RIG_OP_UP|RIG_OP_DOWN|RIG_OP_LEFT|RIG_OP_RIGHT) + +#define AR5000_VFO (RIG_VFO_A|RIG_VFO_B) + +/* + * ar5000 rig capabilities. + * Notice that some rigs share the same functions. + * Also this struct is READONLY! + * + * part of info from http://www.aoruk.com/5000.htm + */ +const struct rig_caps ar5000_caps = { +rig_model: RIG_MODEL_AR5000, +model_name:"AR5000", +mfg_name: "AOR", +version: "0.1", +copyright: "LGPL", +status: RIG_STATUS_UNTESTED, +rig_type: RIG_TYPE_SCANNER, +ptt_type: RIG_PTT_NONE, +dcd_type: RIG_DCD_NONE, +port_type: RIG_PORT_SERIAL, +serial_rate_min: 4800, +serial_rate_max: 19200, +serial_data_bits: 8, +serial_stop_bits: 2, +serial_parity: RIG_PARITY_NONE, +serial_handshake: RIG_HANDSHAKE_XONXOFF, +write_delay: 0, +post_write_delay: 0, +timeout: 200, +retry: 3, +has_get_func: RIG_FUNC_NONE, +has_set_func: AR5000_FUNC_ALL, +has_get_level: AR5000_LEVEL, +has_set_level: RIG_LEVEL_SET(AR5000_LEVEL), +has_get_parm: RIG_PARM_NONE, +has_set_parm: RIG_PARM_NONE, /* FIXME: parms */ +level_gran: {}, /* FIXME: granularity */ +parm_gran: {}, +ctcss_list: NULL, /* FIXME: CTCSS list */ +dcs_list: NULL, +preamp: { RIG_DBLST_END, }, +attenuator: { 20, RIG_DBLST_END, }, /* TBC */ +max_rit: Hz(0), +max_xit: Hz(0), +max_ifshift: Hz(0), +targetable_vfo: 0, +transceive: RIG_TRN_RIG, +bank_qty: 20, +chan_desc_sz: 12, +vfo_ops: AR5000_VFO_OPS, + +chan_list: { RIG_CHAN_END, }, /* FIXME: memory channel list: 1000 memories */ + +rx_range_list1: { + {kHz(10),MHz(2600),AR5000_MODES,-1,-1,AR5000_VFO}, + RIG_FRNG_END, + }, +tx_range_list1: { RIG_FRNG_END, }, + +rx_range_list2: { + {kHz(10),MHz(2600),AR5000_MODES,-1,-1,AR5000_VFO}, + RIG_FRNG_END, + }, /* rx range */ +tx_range_list2: { RIG_FRNG_END, }, /* no tx range, this is a scanner! */ + +tuning_steps: { + {AR5000_MODES,50}, + {AR5000_MODES,100}, + {AR5000_MODES,200}, + {AR5000_MODES,500}, + {AR5000_MODES,kHz(1)}, + {AR5000_MODES,kHz(2)}, + {AR5000_MODES,kHz(5)}, + {AR5000_MODES,kHz(6.25)}, + {AR5000_MODES,kHz(9)}, + {AR5000_MODES,kHz(10)}, + {AR5000_MODES,12500}, + {AR5000_MODES,kHz(20)}, + {AR5000_MODES,kHz(25)}, + {AR5000_MODES,kHz(30)}, + {AR5000_MODES,kHz(50)}, + {AR5000_MODES,kHz(100)}, + {AR5000_MODES,kHz(200)}, + {AR5000_MODES,kHz(250)}, + {AR5000_MODES,kHz(500)}, +#if 0 + {AR5000_MODES,0}, /* any tuning step */ +#endif + RIG_TS_END, + }, + /* mode/filter list, remember: order matters! */ +filters: { + /* mode/filter list, remember: order matters! */ + {RIG_MODE_SSB|RIG_MODE_CW, kHz(3)}, + {RIG_MODE_FM|RIG_MODE_AM, kHz(15)}, + {RIG_MODE_FM|RIG_MODE_AM, kHz(6)}, /* narrow */ + {RIG_MODE_FM|RIG_MODE_AM, kHz(30)}, /* wide */ + {RIG_MODE_WFM, kHz(220)}, + {RIG_MODE_WFM, kHz(120)}, + RIG_FLT_END, + }, + +priv: NULL, +rig_init: NULL, +rig_cleanup: NULL, +rig_open: NULL, +rig_close: aor_close, + +set_freq: aor_set_freq, +get_freq: aor_get_freq, +set_mode: aor_set_mode, +get_mode: aor_get_mode, +set_vfo: aor_set_vfo, +get_vfo: aor_get_vfo, + +set_ts: aor_set_ts, +set_powerstat: aor_set_powerstat, +vfo_op: aor_vfo_op, +get_info: aor_get_info, + +}; + +/* + * Function definitions below + */ + + diff --git a/icom/icr7000.c b/icom/icr7000.c new file mode 100644 index 000000000..478dd4e6d --- /dev/null +++ b/icom/icr7000.c @@ -0,0 +1,156 @@ +/* + * Hamlib CI-V backend - IC-R7000 description + * Copyright (c) 2000-2002 by Stephane Fillod + * + * $Id: icr7000.c,v 1.1 2002-02-27 23:17:57 fillods 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 +#include "icom.h" + + +#define ICR7000_MODES (RIG_MODE_AM|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_WFM) + +#define ICR7000_FUNC_ALL (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_TSQL|RIG_FUNC_APF) + +#define ICR7000_LEVEL_ALL (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_APF|RIG_LEVEL_SQL|RIG_LEVEL_SQLSTAT|RIG_LEVEL_STRENGTH) + +#define ICR7000_OPS (RIG_OP_CPY|RIG_OP_XCHG|RIG_OP_FROM_VFO|RIG_OP_TO_VFO|RIG_OP_MCL) + +static const struct icom_priv_caps icr7000_priv_caps = { + 0x08, /* default address */ + 0, /* 731 mode */ + r7100_ts_sc_list, + EMPTY_STR_CAL +}; +/* + * ICR7000 rigs capabilities. + */ +const struct rig_caps icr7000_caps = { +rig_model: RIG_MODEL_ICR7000, +model_name:"ICR-7000", +mfg_name: "Icom", +version: "0.2", +copyright: "LGPL", +status: RIG_STATUS_UNTESTED, +rig_type: RIG_TYPE_RECEIVER, +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: RIG_FUNC_NONE, +has_set_func: ICR7000_FUNC_ALL, +has_get_level: ICR7000_LEVEL_ALL, +has_set_level: RIG_LEVEL_SET(ICR7000_LEVEL_ALL), +has_get_parm: RIG_PARM_NONE, +has_set_parm: RIG_PARM_NONE, /* FIXME: parms */ +level_gran: {}, /* FIXME: granularity */ +parm_gran: {}, +ctcss_list: NULL, /* FIXME: CTCSS/DCS list */ +dcs_list: NULL, +preamp: { 10, RIG_DBLST_END, }, +attenuator: { 20, RIG_DBLST_END, }, +max_rit: Hz(9999), +max_xit: Hz(0), +max_ifshift: Hz(0), +targetable_vfo: 0, +vfo_ops: ICR7000_OPS, +transceive: RIG_TRN_RIG, +bank_qty: 12, +chan_desc_sz: 0, + +chan_list: { RIG_CHAN_END, }, /* FIXME: memory channel list */ + +rx_range_list1: { + {MHz(25),MHz(1000),ICR7000_MODES,-1,-1, RIG_VFO_A}, + {MHz(1025),MHz(2000),ICR7000_MODES,-1,-1, RIG_VFO_A}, + RIG_FRNG_END, }, +tx_range_list1: { RIG_FRNG_END, }, + +rx_range_list2: { + {MHz(25),MHz(1000),ICR7000_MODES,-1,-1, RIG_VFO_A}, + {MHz(1025),MHz(2000),ICR7000_MODES,-1,-1, RIG_VFO_A}, + RIG_FRNG_END, }, +tx_range_list2: { RIG_FRNG_END, }, /* no TX ranges, this is a receiver */ + +tuning_steps: { + {ICR7000_MODES,100}, + {ICR7000_MODES,kHz(1)}, + {ICR7000_MODES,kHz(5)}, + {ICR7000_MODES,kHz(10)}, + {ICR7000_MODES,12500}, + {ICR7000_MODES,kHz(25)}, + RIG_TS_END, + }, + /* mode/filter list, remember: order matters! */ +filters: { + {RIG_MODE_SSB, kHz(2.8)}, + {RIG_MODE_FM|RIG_MODE_AM, kHz(15)}, + {RIG_MODE_FM|RIG_MODE_AM, kHz(6)}, /* narrow */ + {RIG_MODE_WFM, kHz(150)}, + RIG_FLT_END, + }, + +cfgparams: icom_cfg_params, +set_conf: icom_set_conf, +get_conf: icom_get_conf, + +priv: (void*)&icr7000_priv_caps, +rig_init: icom_init, +rig_cleanup: icom_cleanup, +rig_open: NULL, +rig_close: NULL, + +set_freq: icom_set_freq, +get_freq: icom_get_freq, +set_mode: icom_set_mode, +get_mode: icom_get_mode, +set_vfo: icom_set_vfo, + +decode_event: icom_decode_event, +set_level: icom_set_level, +get_level: icom_get_level, +set_func: icom_set_func, +set_channel: icom_set_channel, +get_channel: icom_get_channel, +set_mem: icom_set_mem, +vfo_op: icom_vfo_op, +set_ts: icom_set_ts, +get_ts: icom_get_ts, +}; + + +/* + * Function definitions below + */ + +