kopia lustrzana https://github.com/Hamlib/Hamlib
Initial support for FUNcube Dongle Pro
I wrote first support for new version of FUNcube Dongle. Differences against original FCD are changed USB PID and wider frequency range. 73 Lada, OK1ZIA Signed-off-by: Nate Bargmann <n0nb@n0nb.us>Hamlib-3.0
rodzic
2889f49392
commit
df114a64bc
|
@ -477,6 +477,7 @@
|
|||
#define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */
|
||||
#define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */
|
||||
#define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */
|
||||
#define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */
|
||||
|
||||
/*
|
||||
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "funcube.h"
|
||||
|
||||
static int funcube_init(RIG *rig);
|
||||
static int funcubeplus_init(RIG *rig);
|
||||
static int funcube_cleanup(RIG *rig);
|
||||
static int funcube_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
||||
static int funcube_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||
|
@ -142,6 +143,68 @@ const struct rig_caps funcube_caps = {
|
|||
.get_info = funcube_get_info,
|
||||
};
|
||||
|
||||
|
||||
const struct rig_caps funcubeplus_caps = {
|
||||
.rig_model = RIG_MODEL_FUNCUBEDONGLEPLUS,
|
||||
.model_name = "FUNcube Dongle Pro+",
|
||||
.mfg_name = "AMSAT-UK",
|
||||
.version = "0.2",
|
||||
.copyright = "GPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_TUNER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_USB,
|
||||
.write_delay = 0,
|
||||
.post_write_delay = 0,
|
||||
.timeout = 1000,
|
||||
.retry = 0,
|
||||
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = RIG_FUNC_NONE,
|
||||
.has_get_level = RIG_LEVEL_ATT | RIG_LEVEL_STRENGTH | RIG_LEVEL_PREAMP,
|
||||
.has_set_level = RIG_LEVEL_ATT | RIG_LEVEL_PREAMP,
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.level_gran = {},
|
||||
.parm_gran = {},
|
||||
.ctcss_list = NULL,
|
||||
.dcs_list = NULL,
|
||||
.preamp = { 5, 10, 15, 20, 25, 30, RIG_DBLST_END, },
|
||||
.attenuator = { 2, 5, 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 = { RIG_CHAN_END, },
|
||||
|
||||
.rx_range_list1 = {
|
||||
{kHz(150),MHz(1900),RIG_MODE_USB,-1,-1,RIG_VFO_A},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tuning_steps = {
|
||||
{RIG_MODE_USB,kHz(1)},
|
||||
RIG_TS_END,
|
||||
},
|
||||
.filters = {
|
||||
{RIG_MODE_USB, kHz(192)},
|
||||
RIG_FLT_END,
|
||||
},
|
||||
.cfgparams = funcube_cfg_params,
|
||||
|
||||
.rig_init = funcubeplus_init,
|
||||
.rig_cleanup = funcube_cleanup,
|
||||
.set_freq = funcube_set_freq,
|
||||
.get_freq = funcube_get_freq,
|
||||
.get_level = funcube_get_level,
|
||||
.set_level = funcube_set_level,
|
||||
.get_info = funcube_get_info,
|
||||
};
|
||||
|
||||
int funcube_init(RIG *rig)
|
||||
{
|
||||
hamlib_port_t *rp = &rig->state.rigport;
|
||||
|
@ -169,6 +232,33 @@ int funcube_init(RIG *rig)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
int funcubeplus_init(RIG *rig)
|
||||
{
|
||||
hamlib_port_t *rp = &rig->state.rigport;
|
||||
struct funcube_priv_data *priv;
|
||||
|
||||
priv = (struct funcube_priv_data*)calloc(sizeof(struct funcube_priv_data), 1);
|
||||
if (!priv) {
|
||||
/* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
}
|
||||
|
||||
priv->freq = 0;
|
||||
|
||||
rp->parm.usb.vid = VID;
|
||||
rp->parm.usb.pid = PIDPLUS;
|
||||
rp->parm.usb.conf = FUNCUBE_CONFIGURATION;
|
||||
rp->parm.usb.iface = FUNCUBE_INTERFACE;
|
||||
rp->parm.usb.alt = FUNCUBE_ALTERNATIVE_SETTING;
|
||||
|
||||
rp->parm.usb.vendor_name = VENDOR_NAME;
|
||||
rp->parm.usb.product = PRODUCT_NAMEPLUS;
|
||||
|
||||
rig->state.priv = (void*)priv;
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
int funcube_cleanup(RIG *rig)
|
||||
{
|
||||
if (!rig)
|
||||
|
|
|
@ -28,8 +28,10 @@
|
|||
|
||||
#define VID 0x04D8
|
||||
#define PID 0xFB56
|
||||
#define PIDPLUS 0xFB31
|
||||
#define VENDOR_NAME "Hanlincrest Ltd. "
|
||||
#define PRODUCT_NAME "FunCube Dongle"
|
||||
#define PRODUCT_NAMEPLUS "FunCube Dongle Pro+"
|
||||
|
||||
#define FUNCUBE_INTERFACE 0x02
|
||||
#define FUNCUBE_CONFIGURATION -1 /* no setup */
|
||||
|
|
|
@ -54,6 +54,7 @@ DECLARE_INITRIG_BACKEND(kit)
|
|||
rig_register(&funcube_caps);
|
||||
rig_register(&fifisdr_caps);
|
||||
rig_register(&fasdr_caps);
|
||||
rig_register(&funcubeplus_caps);
|
||||
#endif
|
||||
#if (defined(HAVE_LIBUSB) && defined(HAVE_USB_H)) || defined(_WIN32)
|
||||
/* rigs with alternate DLL support on Win32 */
|
||||
|
|
|
@ -37,6 +37,7 @@ extern const struct rig_caps usrp_caps;
|
|||
extern const struct rig_caps dds60_caps;
|
||||
extern const struct rig_caps miniVNA_caps;
|
||||
extern const struct rig_caps funcube_caps;
|
||||
extern const struct rig_caps funcubeplus_caps;
|
||||
extern const struct rig_caps fifisdr_caps;
|
||||
extern const struct rig_caps hiqsdr_caps;
|
||||
extern const struct rig_caps fasdr_caps;
|
||||
|
|
Ładowanie…
Reference in New Issue