kopia lustrzana https://github.com/Hamlib/Hamlib
added BC245 skelton
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1660 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.0
rodzic
c7dbda67d6
commit
66a82fd87f
|
@ -1,4 +1,4 @@
|
|||
UNIDENSRC = bc895.c
|
||||
UNIDENSRC = bc895.c bc245.c
|
||||
|
||||
lib_LTLIBRARIES = hamlib-uniden.la
|
||||
hamlib_uniden_la_SOURCES = $(UNIDENSRC) uniden.c
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Hamlib Uniden backend - BC245 description
|
||||
* Copyright (c) 2001-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: bc245.c,v 1.1 2004-02-08 16:59:48 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 <stdlib.h>
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
#include "uniden.h"
|
||||
|
||||
|
||||
#define BC245_MODES (RIG_MODE_AM|RIG_MODE_FM|RIG_MODE_WFM)
|
||||
|
||||
#define BC245_FUNC (RIG_FUNC_SQL)
|
||||
|
||||
#define BC245_LEVEL_ALL (RIG_LEVEL_NONE)
|
||||
|
||||
#define BC245_PARM_ALL (RIG_PARM_NONE)
|
||||
|
||||
#define BC245_VFO RIG_VFO_A
|
||||
|
||||
/*
|
||||
* bc245 rig capabilities.
|
||||
*
|
||||
* TODO: check this with manual or web site.
|
||||
*/
|
||||
const struct rig_caps bc245_caps = {
|
||||
.rig_model = RIG_MODEL_BC245,
|
||||
.model_name = "BC245xlt",
|
||||
.mfg_name = "Uniden",
|
||||
.version = "0.1",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.rig_type = RIG_TYPE_TRUNKSCANNER,
|
||||
.ptt_type = RIG_PTT_NONE,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.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 = 1,
|
||||
.timeout = 200,
|
||||
.retry = 3,
|
||||
|
||||
.has_get_func = BC245_FUNC,
|
||||
.has_set_func = BC245_FUNC,
|
||||
.has_get_level = BC245_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(BC245_LEVEL_ALL),
|
||||
.has_get_parm = BC245_PARM_ALL,
|
||||
.has_set_parm = RIG_PARM_SET(BC245_PARM_ALL),
|
||||
.level_gran = {}, /* FIXME: granularity */
|
||||
.parm_gran = {},
|
||||
.ctcss_list = NULL, /* FIXME: CTCSS list? */
|
||||
.dcs_list = NULL,
|
||||
.preamp = { RIG_DBLST_END },
|
||||
.attenuator = { RIG_DBLST_END },
|
||||
.max_rit = Hz(0),
|
||||
.max_xit = Hz(0),
|
||||
.max_ifshift = Hz(0),
|
||||
.targetable_vfo = 0,
|
||||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
|
||||
.chan_list = {
|
||||
{ 1, 300, RIG_MTYPE_MEM },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = { RIG_FRNG_END, }, /* FIXME: enter region 1 setting */
|
||||
.tx_range_list1 = { RIG_FRNG_END, },
|
||||
.rx_range_list2 = {
|
||||
{MHz(29),MHz(54),BC245_MODES,-1,-1,BC245_VFO},
|
||||
{MHz(108),MHz(174),BC245_MODES,-1,-1,BC245_VFO},
|
||||
{MHz(406),MHz(512),BC245_MODES,-1,-1,BC245_VFO},
|
||||
{MHz(806),MHz(956),BC245_MODES,-1,-1,BC245_VFO}, /* TODO: less cellular */
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list2 = { RIG_FRNG_END, },
|
||||
.tuning_steps = {
|
||||
{BC245_MODES,10}, /* FIXME: add other ts */
|
||||
RIG_TS_END,
|
||||
},
|
||||
/* mode/filter list, remember: order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_AM|RIG_MODE_FM, kHz(8)},
|
||||
{RIG_MODE_WFM, kHz(230)},
|
||||
RIG_FLT_END,
|
||||
},
|
||||
.priv = NULL,
|
||||
|
||||
.set_freq = uniden_set_freq,
|
||||
.set_mem = uniden_set_mem,
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Function definitions below
|
||||
*/
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Uniden backend - main file
|
||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||
* Copyright (c) 2001-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: uniden.c,v 1.8 2003-10-20 22:15:02 fillods Exp $
|
||||
* $Id: uniden.c,v 1.9 2004-02-08 16:59:48 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
|
||||
|
@ -120,6 +120,7 @@ DECLARE_INITRIG_BACKEND(uniden)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "uniden: _init called\n");
|
||||
|
||||
rig_register(&bc895_caps);
|
||||
rig_register(&bc245_caps);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Uniden backend - main header
|
||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||
* Copyright (c) 2001-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: uniden.h,v 1.4 2003-04-16 22:30:43 fillods Exp $
|
||||
* $Id: uniden.h,v 1.5 2004-02-08 16:59:48 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
|
||||
|
@ -31,6 +31,7 @@ int uniden_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
|||
int uniden_set_mem(RIG *rig, vfo_t vfo, int ch);
|
||||
|
||||
extern const struct rig_caps bc895_caps;
|
||||
extern const struct rig_caps bc245_caps;
|
||||
|
||||
|
||||
#endif /* _UNIDEN_H */
|
||||
|
|
Ładowanie…
Reference in New Issue