From c7d44331a9e338aefcb0f84e88a5d4248593faba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Mon, 4 Jun 2001 21:07:17 +0000 Subject: [PATCH] joined ft747&ft847 in new yaesu backend git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@525 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- yaesu/Makefile.am | 19 ++++++++------- yaesu/yaesu.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ yaesu/yaesu.h | 4 +++- 3 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 yaesu/yaesu.c diff --git a/yaesu/Makefile.am b/yaesu/Makefile.am index 32f7bcfc1..d2da449c3 100644 --- a/yaesu/Makefile.am +++ b/yaesu/Makefile.am @@ -1,9 +1,12 @@ -lib_LTLIBRARIES = libhamlib-ft747.la libhamlib-ft847.la -libhamlib_ft747_la_SOURCES = ft747.c -libhamlib_ft847_la_SOURCES = ft847.c -libhamlib_ft747_la_LDFLAGS = -avoid-version # -module -libhamlib_ft847_la_LDFLAGS = -avoid-version # -module -lib_LIBRARIES = libhamlib-ft747.a libhamlib-ft847.a -libhamlib_ft747_a_SOURCES = ft747.c -libhamlib_ft847_a_SOURCES = ft847.c +YAESUSRC = ft747.c ft847.c + +lib_LTLIBRARIES = libhamlib-yaesu.la +libhamlib_yaesu_la_SOURCES = yaesu.c $(YAESUSRC) +libhamlib_yaesu_la_LDFLAGS = -avoid-version # -module +libhamlib_yaesu_la_LIBADD = ../src/libhamlib.la + +lib_LIBRARIES = libhamlib-yaesu.a +libhamlib_yaesu_a_SOURCES = yaesu.c $(YAESUSRC) +libhamlib_yaesu_a_LIBADD = ../src/libhamlib.la + noinst_HEADERS = ft747.h ft847.h yaesu.h diff --git a/yaesu/yaesu.c b/yaesu/yaesu.c new file mode 100644 index 000000000..094a46cd3 --- /dev/null +++ b/yaesu/yaesu.c @@ -0,0 +1,60 @@ +/* + * hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com) + * + * yaesu.c - (C) Stephane Fillod 2001 + * + * This shared library provides an API for communicating + * via serial interface to a Yaesu rig + * + * + * $Id: yaesu.c,v 1.1 2001-06-04 21:07:17 f4cfe Exp $ + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + + +#include +#include /* Standard input/output definitions */ +#include /* String function definitions */ +#include /* UNIX standard function definitions */ +#include /* File control definitions */ +#include /* Error number definitions */ +#include /* POSIX terminal control definitions */ +#include + +#include +#include +#include "serial.h" +#include "misc.h" +#include "yaesu.h" +#include "ft747.h" + + +/* + * init_yaesu is called by rig_backend_load + */ + +int init_yaesu(void *be_handle) +{ + rig_debug(RIG_DEBUG_VERBOSE, "yaesu: _init called\n"); + + rig_register(&ft747_caps); + rig_register(&ft847_caps); + + return RIG_OK; +} + diff --git a/yaesu/yaesu.h b/yaesu/yaesu.h index 54e566462..b38458b83 100644 --- a/yaesu/yaesu.h +++ b/yaesu/yaesu.h @@ -4,7 +4,7 @@ * yaesu.h - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com) * Common yaesu declarations for hamlib * - * $Id: yaesu.h,v 1.3 2000-12-22 04:59:17 javabear Exp $ + * $Id: yaesu.h,v 1.4 2001-06-04 21:07:17 f4cfe Exp $ * * * @@ -45,5 +45,7 @@ struct yaesu_cmd_set { typedef struct yaesu_cmd_set yaesu_cmd_set_t; +const struct rig_caps ft747_caps; +const struct rig_caps ft847_caps; #endif /* _YAESU_H */