git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2997 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.13
Stéphane Fillod, F8CFE 2010-10-26 20:47:35 +00:00
rodzic 9de8e3f1d2
commit 1d8e24003a
10 zmienionych plików z 1274 dodań i 2 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ SUBDIRS = macros include lib $(subdirs) src @BACKEND_LIST@ @ROT_BACKEND_LIST@ \
DIST_SUBDIRS = macros include lib $(subdirs) src c++ bindings tests doc \
icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc \
rpcrig winradio easycomm fodtrack rpcrot drake rotorez \
flexradio sartek lowe rft rs tapr kit skanti wj racal tuner \
flexradio sartek lowe rft rs tapr kit skanti prm80 wj racal tuner \
gs232a heathkit spid ars m2
rpm: Makefile

Wyświetl plik

@ -86,6 +86,7 @@ General Guidelines.
|-- miniVNA
|-- pcr
|-- perl
|-- prm80
|-- racal
|-- rft
|-- rotorez

Wyświetl plik

@ -36,6 +36,8 @@
%ignore RIG_BACKEND_EK;
%ignore RIG_SKANTI;
%ignore RIG_BACKEND_SKANTI;
%ignore RIG_PRM80;
%ignore RIG_BACKEND_PRM80;
%ignore RIG_WINRADIO;
%ignore RIG_BACKEND_WINRADIO;
%ignore RIG_TENTEC;

Wyświetl plik

@ -232,7 +232,7 @@ fi
AC_SUBST(RIGMATRIX)
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc drake lowe rft rs kit skanti tapr flexradio wj racal tuner"
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc drake lowe rft rs kit skanti prm80 tapr flexradio wj racal tuner"
ROT_BACKEND_LIST="dummy easycomm fodtrack gs232a heathkit kit rotorez sartek spid ars m2"
BINDINGS=""
BINDING_ALL=""
@ -489,6 +489,7 @@ rs/Makefile
kit/Makefile
tapr/Makefile
skanti/Makefile
prm80/Makefile
wj/Makefile
racal/Makefile
tuner/Makefile

Wyświetl plik

@ -482,6 +482,14 @@
#define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1)
#define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2)
/*
* Phillips/Simoco PRM80
*/
#define RIG_PRM80 28
#define RIG_BACKEND_PRM80 "prm80"
#define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1)
#define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2)
/*
* TODO:
@ -528,6 +536,7 @@ typedef int rig_model_t;
{ RIG_KIT, RIG_BACKEND_KIT }, \
{ RIG_TUNER, RIG_BACKEND_TUNER }, \
{ RIG_RS, RIG_BACKEND_RS }, \
{ RIG_PRM80, RIG_BACKEND_PRM80 }, \
{ 0, NULL }, /* end */ \
}

Wyświetl plik

@ -0,0 +1,8 @@
PRM80SRCLIST = prm8060.c
pkglib_LTLIBRARIES = hamlib-prm80.la
hamlib_prm80_la_SOURCES = $(PRM80SRCLIST) prm80.c
hamlib_prm80_la_LDFLAGS = -no-undefined -module -avoid-version
hamlib_prm80_la_LIBADD = $(top_builddir)/src/libhamlib.la
noinst_HEADERS = prm80.h

623
prm80/Makefile.in 100644
Wyświetl plik

@ -0,0 +1,623 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = prm80
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/ac_python_devel.m4 \
$(top_srcdir)/macros/aclocal-include.m4 \
$(top_srcdir)/macros/acx_pthread.m4 \
$(top_srcdir)/macros/argz.m4 $(top_srcdir)/macros/gr_pwin32.m4 \
$(top_srcdir)/macros/gr_swig.m4 \
$(top_srcdir)/macros/hl_getaddrinfo.m4 \
$(top_srcdir)/macros/lf_warnings.m4 \
$(top_srcdir)/macros/libtool.m4 $(top_srcdir)/macros/ltdl.m4 \
$(top_srcdir)/macros/ltoptions.m4 \
$(top_srcdir)/macros/ltsugar.m4 \
$(top_srcdir)/macros/ltversion.m4 \
$(top_srcdir)/macros/lt~obsolete.m4 \
$(top_srcdir)/macros/perl.m4 $(top_srcdir)/macros/tcl.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
hamlib_prm80_la_DEPENDENCIES = $(top_builddir)/src/libhamlib.la
am__objects_1 = prm8060.lo
am_hamlib_prm80_la_OBJECTS = $(am__objects_1) prm80.lo
hamlib_prm80_la_OBJECTS = $(am_hamlib_prm80_la_OBJECTS)
hamlib_prm80_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(hamlib_prm80_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(hamlib_prm80_la_SOURCES)
DIST_SOURCES = $(hamlib_prm80_la_SOURCES)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ABI_VERSION = @ABI_VERSION@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BACKENDEPS = @BACKENDEPS@
BACKENDLNK = @BACKENDLNK@
BACKEND_LIST = @BACKEND_LIST@
BINDINGS = @BINDINGS@
BINDING_ALL = @BINDING_ALL@
BINDING_CHECK = @BINDING_CHECK@
BINDING_CLEAN = @BINDING_CLEAN@
BINDING_DISTCHECK = @BINDING_DISTCHECK@
BINDING_DISTCLEAN = @BINDING_DISTCLEAN@
BINDING_INSTALL_EXEC = @BINDING_INSTALL_EXEC@
BINDING_LIB_TARGETS = @BINDING_LIB_TARGETS@
BINDING_LIST = @BINDING_LIST@
BINDING_UNINSTALL = @BINDING_UNINSTALL@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INCLTDL = @INCLTDL@
INCLUDES = @INCLUDES@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
LIBUSB_LIBS = @LIBUSB_LIBS@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTLIBOBJS = @LTLIBOBJS@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MATH_LIBS = @MATH_LIBS@
MKDIR_P = @MKDIR_P@
NET_LIBS = @NET_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OSXLDFLAGS = @OSXLDFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_INC_DIR = @PERL_INC_DIR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RIGMATRIX = @RIGMATRIX@
ROT_BACKENDEPS = @ROT_BACKENDEPS@
ROT_BACKENDLNK = @ROT_BACKENDLNK@
ROT_BACKEND_LIST = @ROT_BACKEND_LIST@
RPMBUILD = @RPMBUILD@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SWIG = @SWIG@
TCL_BIN_DIR = @TCL_BIN_DIR@
TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
TCL_LIB_FILE = @TCL_LIB_FILE@
TCL_LIB_SPEC = @TCL_LIB_SPEC@
TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
TCL_SRC_DIR = @TCL_SRC_DIR@
USRP_CFLAGS = @USRP_CFLAGS@
USRP_LIBS = @USRP_LIBS@
VERSION = @VERSION@
WINLDFLAGS = @WINLDFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
cf_with_bindings = @cf_with_bindings@
cf_with_cxx = @cf_with_cxx@
cf_with_rpcgen = @cf_with_rpcgen@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
hamlibdocdir = @hamlibdocdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
ltdl_LIBOBJS = @ltdl_LIBOBJS@
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
PRM80SRCLIST = prm8060.c
pkglib_LTLIBRARIES = hamlib-prm80.la
hamlib_prm80_la_SOURCES = $(PRM80SRCLIST) prm80.c
hamlib_prm80_la_LDFLAGS = -no-undefined -module -avoid-version
hamlib_prm80_la_LIBADD = $(top_builddir)/src/libhamlib.la
noinst_HEADERS = prm80.h
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu prm80/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu prm80/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
}
uninstall-pkglibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
done
clean-pkglibLTLIBRARIES:
-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
hamlib-prm80.la: $(hamlib_prm80_la_OBJECTS) $(hamlib_prm80_la_DEPENDENCIES)
$(hamlib_prm80_la_LINK) -rpath $(pkglibdir) $(hamlib_prm80_la_OBJECTS) $(hamlib_prm80_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prm80.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prm8060.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(pkglibdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-pkglibLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-pkglibLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-pkglibLTLIBRARIES \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

440
prm80/prm80.c 100644
Wyświetl plik

@ -0,0 +1,440 @@
/*
* Hamlib PRM80 backend - main file
* Copyright (c) 2010 by Stephane Fillod
*
*
* 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 <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <math.h>
#include "hamlib/rig.h"
#include "serial.h"
#include "misc.h"
#include "cal.h"
#include "register.h"
#include "idx_builtin.h"
#include "prm80.h"
#define LF "\x0a"
#define PROMPT ">"
#define BUFSZ 32
/*
[0] = Reset.
[C] = Print channels list.
[D] = Set system byte.
[E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX
freq).
[F] = Set squelch.
[H] = Print this help page.
[K] = Set lock byte.
[N] = Set current channel.
[O] = Set volume.
[P] = Edit/Add channel.
[Q] = Set channels number.
[R] = Set synthetiser frequencies.
[T] = Set current channel state.
[V] = Print firmware version.
*/
/*
* prm80_transaction
* We assume that rig!=NULL, rig->state!= NULL, data!=NULL, data_len!=NULL
* Otherwise, you'll get a nice seg fault. You've been warned!
* TODO: error case handling
*/
static int prm80_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *data_len)
{
int retval;
struct rig_state *rs;
rs = &rig->state;
serial_flush(&rs->rigport);
retval = write_block(&rs->rigport, cmd, cmd_len);
if (retval != RIG_OK)
return retval;
/* no data expected, check for OK returned */
if (!data || !data_len) {
#if 0
char retbuf[BUFSZ+1];
/*
* Does transceiver sends back ">" ?
*/
retval = read_string(&rs->rigport, retbuf, BUFSZ, PROMPT, strlen(PROMPT));
if (retval < 0)
return retval;
retbuf[retval] = '\0';
if (strstr(retbuf, PROMPT))
return RIG_OK;
else
return -RIG_ERJCTED;
#else
return RIG_OK;
#endif
}
retval = read_string(&rs->rigport, data, BUFSZ, LF, strlen(LF));
if (retval == -RIG_ETIMEOUT)
retval = 0;
if (retval < 0)
return retval;
*data_len = retval;
/* strip CR/LF from string
*/
if (*data_len >= 2)
*data_len -= 2;
data[*data_len] = 0;
return RIG_OK;
}
/*
* prm80_reset
* Assumes rig!=NULL
*/
int prm80_reset(RIG *rig, reset_t reset)
{
int retval;
/*
* master reset ?
*/
retval = prm80_transaction (rig, "0", 1, NULL, NULL);
return RIG_OK;
}
/*
* prm80_set_freq
* Assumes rig!=NULL
*/
int prm80_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
char freqbuf[BUFSZ];
int freq_len;
/* wild guess */
freq_len = sprintf(freqbuf, "R%04X%04X",
(unsigned)(freq / 12500.),
(unsigned)(freq / 12500.));
return prm80_transaction (rig, freqbuf, freq_len, NULL, NULL);
}
/*
* prm80_get_freq
* Assumes rig!=NULL
*/
int prm80_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
int ret;
channel_t chan;
memset(&chan, 0, sizeof(chan));
chan.vfo = RIG_VFO_CURR;
ret = prm80_get_channel(rig, &chan);
if (ret != RIG_OK)
return ret;
*freq = chan.freq;
return RIG_OK;
}
/*
* prm80_get_split_freq
* Assumes rig!=NULL
*/
int prm80_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
{
int ret;
channel_t chan;
memset(&chan, 0, sizeof(chan));
chan.vfo = RIG_VFO_CURR;
ret = prm80_get_channel(rig, &chan);
if (ret != RIG_OK)
return ret;
*tx_freq = chan.tx_freq;
return RIG_OK;
}
/*
* prm80_set_mem
* Assumes rig!=NULL
*/
int prm80_set_mem(RIG *rig, vfo_t vfo, int ch)
{
int cmd_len;
char cmdbuf[BUFSZ];
/* [N] = Set current channel. */
if (ch < 0 || ch > 99)
return -RIG_EINVAL;
cmd_len = sprintf(cmdbuf, "N%02u" , ch);
return prm80_transaction (rig, cmdbuf, cmd_len, NULL, NULL);
}
/*
* prm80_get_mem
* Assumes rig!=NULL
*/
int prm80_get_mem(RIG *rig, vfo_t vfo, int *ch)
{
int ret;
channel_t chan;
memset(&chan, 0, sizeof(chan));
chan.vfo = RIG_VFO_CURR;
ret = prm80_get_channel(rig, &chan);
if (ret != RIG_OK)
return ret;
*ch = chan.channel_num;
return RIG_OK;
}
/*
* Convert first two hexadecimal digit to integer
*/
static int hhtoi(const char *p)
{
char buf[4];
buf[0] = p[0];
buf[1] = p[1];
buf[2] = '\0';
return (int)strtol(buf, NULL, 16);
}
/*
* prm80_get_channel
* Assumes rig!=NULL
*/
int prm80_get_channel(RIG * rig, channel_t * chan)
{
char statebuf[BUFSZ];
int statebuf_len = BUFSZ;
int ret, chanstate;
if (chan->vfo == RIG_VFO_MEM) {
ret = prm80_set_mem(rig, RIG_VFO_CURR, chan->channel_num);
if (ret != RIG_OK)
return ret;
}
/* [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq). */
ret = prm80_transaction (rig, "E", 1, statebuf, &statebuf_len);
if (ret != RIG_OK)
return ret;
if (ret < 20)
return -RIG_EPROTO;
/* Example: 1240080AFF0033F02D40 */
if (hhtoi(statebuf) != 0x12)
rig_debug(RIG_DEBUG_WARN, "%s: Unknown mode 0x%c%c\n",
__func__, statebuf[0], statebuf[1]);
chan->mode = RIG_MODE_FM;
chan->width = rig_passband_normal(rig, chan->mode);
chan->channel_num = hhtoi(statebuf+2);
chanstate = hhtoi(statebuf+4) & 0x0f;
/* is it rptr_shift or split mode ? */
chan->rptr_shift = (chanstate & 0x01) == 0 ? RIG_RPT_SHIFT_NONE :
chanstate & 0x02 ? RIG_RPT_SHIFT_MINUS :
chanstate & 0x04 ? RIG_RPT_SHIFT_PLUS : RIG_RPT_SHIFT_NONE;
chan->flags = chanstate & 0x08 ? RIG_CHFLAG_SKIP : 0;
chan->levels[LVL_SQL].f = ((float)(hhtoi(statebuf+6)&0x0f))/15.;
chan->levels[LVL_AF].f = ((float)(hhtoi(statebuf+8)&0x0f))/15.;
/* same as chanstate bit 1 ? */
chan->flags = hhtoi(statebuf+10) == 0 ? 0 : RIG_CHFLAG_SKIP;
chan->freq = ((hhtoi(statebuf+12)<<8) + hhtoi(statebuf+14)) * 12500;
chan->tx_freq = ((hhtoi(statebuf+16)<<8) + hhtoi(statebuf+18)) * 12500;
return RIG_OK;
}
/*
* prm80_set_channel
* Assumes rig!=NULL
*/
int prm80_set_channel(RIG * rig, const channel_t * chan)
{
char statebuf[BUFSZ];
int statebuf_len = BUFSZ;
int ret;
if (chan->vfo == RIG_VFO_MEM) {
ret = prm80_set_mem(rig, RIG_VFO_CURR, chan->channel_num);
if (ret != RIG_OK)
return ret;
}
/* [T] = Set current channel state. (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq) ? */
/* Example: 1240080AFF0033F02D40 ? */
statebuf_len = sprintf(statebuf, "T%02X%02X%02X%02X%02X%02X%04X%04X",
chan->mode == RIG_MODE_FM ? 0x12 : 0x12,
chan->channel_num,
chan->flags & RIG_CHFLAG_SKIP ? 0x08 : 0, /* TODO: tx shift */
(unsigned)(chan->levels[LVL_SQL].f*15),
(unsigned)(chan->levels[LVL_AF].f*15),
0, /* TODO: Lock */
(unsigned)(chan->freq / 12500.),
(unsigned)(chan->tx_freq / 12500.)
);
ret = prm80_transaction (rig, statebuf, statebuf_len, NULL, NULL);
if (ret != RIG_OK)
return ret;
return RIG_OK;
}
/*
* prm80_set_level
* Assumes rig!=NULL
*/
int prm80_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
{
int cmd_len;
char cmdbuf[BUFSZ];
switch (level) {
case RIG_LEVEL_AF:
cmd_len = sprintf(cmdbuf, "O%02u" , (unsigned)(val.f * 15));
return prm80_transaction (rig, cmdbuf, cmd_len, NULL, NULL);
case RIG_LEVEL_SQL:
cmd_len = sprintf(cmdbuf, "F%02u" , (unsigned)(val.f * 15));
return prm80_transaction (rig, cmdbuf, cmd_len, NULL, NULL);
case RIG_LEVEL_RFPOWER:
return -RIG_ENIMPL;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported set_level %d\n", level);
return -RIG_EINVAL;
}
return RIG_OK;
}
/*
* prm80_get_level
* Assumes rig!=NULL
*/
int prm80_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
int ret;
channel_t chan;
memset(&chan, 0, sizeof(chan));
chan.vfo = RIG_VFO_CURR;
ret = prm80_get_channel(rig, &chan);
if (ret != RIG_OK)
return ret;
switch (level) {
case RIG_LEVEL_AF:
val->f = chan.levels[LVL_AF].f;
return RIG_OK;
case RIG_LEVEL_SQL:
val->f = chan.levels[LVL_SQL].f;
return RIG_OK;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported set_level %d\n", level);
return -RIG_EINVAL;
}
return RIG_OK;
}
/*
* prm80_get_info
* Assumes rig!=NULL
*/
const char * prm80_get_info(RIG *rig)
{
static char buf[BUFSZ];
int ret, buf_len=BUFSZ;
/* [V] = Print firmware version. */
ret = prm80_transaction (rig, "V", 1, buf, &buf_len);
if (ret < 0)
return NULL;
return buf;
}
/*
* initrigs_prm80 is called by rig_backend_load
*/
DECLARE_INITRIG_BACKEND(prm80)
{
rig_debug(RIG_DEBUG_VERBOSE, "prm80: _init called\n");
rig_register(&prm8060_caps);
return RIG_OK;
}

51
prm80/prm80.h 100644
Wyświetl plik

@ -0,0 +1,51 @@
/*
* Hamlib PRM80 backend - main header
* Copyright (c) 2010 by Stephane Fillod
*
*
* 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.
*
*/
#ifndef _PRM80_H
#define _PRM80_H 1
#include <hamlib/rig.h>
#define PRM80_MEM_CAP { \
.freq = 1, \
.mode = 1, \
.tx_freq = 1, \
.rptr_shift = 1, \
.flags = 1, /* lockout*/ \
.levels = RIG_LEVEL_SQL|RIG_LEVEL_AF, \
}
int prm80_reset(RIG *rig, reset_t reset);
int prm80_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
int prm80_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
int prm80_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq);
int prm80_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
int prm80_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
int prm80_set_mem (RIG *rig, vfo_t vfo, int ch);
int prm80_get_mem (RIG *rig, vfo_t vfo, int *ch);
int prm80_set_channel(RIG * rig, const channel_t * chan);
int prm80_get_channel(RIG * rig, channel_t * chan);
const char* prm80_get_info(RIG *rig);
extern const struct rig_caps prm8060_caps;
#endif /* _PRM80_H */

137
prm80/prm8060.c 100644
Wyświetl plik

@ -0,0 +1,137 @@
/*
* Hamlib PRM80 backend - PRM8060 description
* Copyright (c) 2010 by Stephane Fillod
*
*
* 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 <string.h>
#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "prm80.h"
#define PRM8060_ALL_MODES (RIG_MODE_FM)
#define PRM8060_FUNC (RIG_FUNC_NONE)
#define PRM8060_LEVEL_ALL (RIG_LEVEL_AF|RIG_LEVEL_SQL)
#define PRM8060_PARM_ALL (RIG_PARM_NONE)
#define PRM8060_VFO_OPS (RIG_OP_NONE)
#define PRM8060_VFO (RIG_VFO_MEM)
/*
* PRM 8060 rig capabilities.
* http://prm80.sourceforge.net/
*
*/
const struct rig_caps prm8060_caps = {
.rig_model = RIG_MODEL_PRM8060,
.model_name = "PRM8060",
.mfg_name = "Philips/Simoco",
.version = "0.1",
.copyright = "LGPL",
.status = RIG_STATUS_UNTESTED,
.rig_type = RIG_TYPE_TRANSCEIVER,
.ptt_type = RIG_PTT_NONE,
.dcd_type = RIG_DCD_NONE,
.port_type = RIG_PORT_SERIAL,
.serial_rate_min = 4800,
.serial_rate_max = 4800,
.serial_data_bits = 7,
.serial_stop_bits = 1,
.serial_parity = RIG_PARITY_SPACE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 0,
.timeout = 2000,
.retry = 3,
.has_get_func = RIG_FUNC_NONE,
.has_set_func = PRM8060_FUNC,
.has_get_level = RIG_LEVEL_NONE,
.has_set_level = RIG_LEVEL_SET(PRM8060_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_SET(PRM8060_PARM_ALL),
.vfo_ops = PRM8060_VFO_OPS,
.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 = {
{ 0, 99, RIG_MTYPE_MEM, PRM80_MEM_CAP },
RIG_CHAN_END,
},
.rx_range_list1 = {
{MHz(144),MHz(146)-kHz(12.5),PRM8060_ALL_MODES,-1,-1,PRM8060_VFO},
RIG_FRNG_END,
},
.tx_range_list1 = {
{MHz(144),MHz(146)-kHz(12.5),PRM8060_ALL_MODES,W(5),W(25),PRM8060_VFO},
RIG_FRNG_END,
},
.rx_range_list2 = {
{MHz(144),MHz(148)-kHz(12.5),PRM8060_ALL_MODES,-1,-1,PRM8060_VFO},
RIG_FRNG_END,
},
.tx_range_list2 = {
{MHz(144),MHz(148)-kHz(12.5),PRM8060_ALL_MODES,W(5),W(25),PRM8060_VFO},
RIG_FRNG_END,
},
.tuning_steps = {
{PRM8060_ALL_MODES,kHz(12.5)},
RIG_TS_END,
},
/* mode/filter list, remember: order matters! */
.filters = {
/* rough guesses */
{PRM8060_ALL_MODES, kHz(12.5)},
RIG_FLT_END,
},
.set_freq = prm80_set_freq,
.get_freq = prm80_get_freq,
.get_split_freq = prm80_get_split_freq,
.set_channel = prm80_set_channel,
.get_channel = prm80_get_channel,
.set_mem = prm80_set_mem,
.get_mem = prm80_get_mem,
.set_level = prm80_set_level,
.get_level = prm80_get_level,
};
/*
* Function definitions below
*/