kopia lustrzana https://github.com/Hamlib/Hamlib
moved from ../ic706, made Icom CI-V generic
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@103 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.0
rodzic
47bea0c838
commit
8f9ce38768
|
@ -0,0 +1,119 @@
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Make file for ICOM program shared lib
|
||||||
|
#
|
||||||
|
# creates: libicom.so
|
||||||
|
#
|
||||||
|
# $Id: Makefile,v 1.1 2000-09-16 01:43:48 f4cfe Exp $
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# .h files go in INSTALL_INCLUDEDIR
|
||||||
|
# .so files go in INSTALL_LIBDIR
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
INSTALL_LIBDIR = ./lib/
|
||||||
|
INSTALL_INCLUDEDIR = ./include/
|
||||||
|
INCLUDE = -I../common
|
||||||
|
|
||||||
|
LIB_NAME = libicom.so
|
||||||
|
LIB_SONAME = libicom.so.1
|
||||||
|
LIB_RELEASE = libicom.so.1.0.1
|
||||||
|
LIB_HEADER = icom.h
|
||||||
|
LIB_SRC = icom.c ic706.c
|
||||||
|
LIB_OBJECTS = icom.o ic706.o
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CFLAGS = -fPIC -g -Wall $(INCLUDE) # -O2
|
||||||
|
|
||||||
|
all: lib
|
||||||
|
|
||||||
|
.PHONY: lib
|
||||||
|
lib: $(LIB_OBJECTS) $(LIB_HEADER)
|
||||||
|
$(CC) -shared -Wl,-soname,$(LIB_SONAME) -o $(LIB_RELEASE) $(LIB_OBJECTS) -lc
|
||||||
|
|
||||||
|
icom.c: icom.h icom_defs.h
|
||||||
|
ic706.c: icom.h icom_defs.h
|
||||||
|
|
||||||
|
# install header and lib
|
||||||
|
|
||||||
|
install:
|
||||||
|
make install_lib
|
||||||
|
make install_header
|
||||||
|
|
||||||
|
# install lib in MYLIBDIR
|
||||||
|
|
||||||
|
.PHONY: install_lib
|
||||||
|
install_lib:
|
||||||
|
mv $(LIB_RELEASE) $(INSTALL_LIBDIR)
|
||||||
|
cd $(INSTALL_LIBDIR); /sbin/ldconfig -n .
|
||||||
|
cd $(INSTALL_LIBDIR); ln -s $(LIB_SONAME) $(LIB_NAME)
|
||||||
|
|
||||||
|
# install libicom.h in INSTALL_INCLUDEDIR
|
||||||
|
|
||||||
|
.PHONY: install_header
|
||||||
|
install_header:
|
||||||
|
cp -f $(LIB_HEADER) $(INSTALL_INCLUDEDIR)
|
||||||
|
|
||||||
|
# build lib and install and build test suite, but DONT run it
|
||||||
|
|
||||||
|
.PHONY: build_all
|
||||||
|
build_all:
|
||||||
|
make all
|
||||||
|
make install
|
||||||
|
(cd test && $(MAKE) all)
|
||||||
|
|
||||||
|
# build everything and run test suite ( stand back ..)
|
||||||
|
|
||||||
|
.PHONY: verify
|
||||||
|
verify:
|
||||||
|
make build_all
|
||||||
|
(cd test && $(MAKE) runtest)
|
||||||
|
|
||||||
|
# clean up local directory, my include and lib
|
||||||
|
# directories also.
|
||||||
|
|
||||||
|
clean:
|
||||||
|
make cleanlocal
|
||||||
|
make cleanlib
|
||||||
|
make cleaninclude
|
||||||
|
|
||||||
|
# clean up local directory, my include and lib and test
|
||||||
|
# directories also.
|
||||||
|
.PHONY: cleanall
|
||||||
|
cleanall:
|
||||||
|
make cleanlocal
|
||||||
|
make cleanlib
|
||||||
|
make cleaninclude
|
||||||
|
make cleantest
|
||||||
|
|
||||||
|
|
||||||
|
# clean up local directory
|
||||||
|
|
||||||
|
.PHONY: cleanlocal
|
||||||
|
cleanlocal:
|
||||||
|
rm -f *.o *.so*
|
||||||
|
|
||||||
|
# clean up local lib directory
|
||||||
|
|
||||||
|
.PHONY: cleanlib
|
||||||
|
cleanlib:
|
||||||
|
cd $(INSTALL_LIBDIR); rm -f $(LIB_NAME)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# clean up local include directory
|
||||||
|
|
||||||
|
.PHONY: cleaninclude
|
||||||
|
cleaninclude:
|
||||||
|
cd $(INSTALL_INCLUDEDIR); rm -f $(LIB_HEADER)
|
||||||
|
|
||||||
|
|
||||||
|
# clean up test directory
|
||||||
|
|
||||||
|
.PHONY: cleantest
|
||||||
|
cleantest:
|
||||||
|
(cd test && $(MAKE) clean)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
hamlib - Copyright (C) 2000 Frank Singleton
|
||||||
|
|
||||||
|
libicom.so - Copyright (C) 2000 Stephane Fillod
|
||||||
|
This shared library provides an API for communicating
|
||||||
|
via serial interface to an ICOM using the "CI-V" interface.
|
||||||
|
|
||||||
|
|
||||||
|
Reference Documentation
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Operating Manual
|
||||||
|
IC-706MKIIG
|
||||||
|
Icom Inc.
|
||||||
|
|
||||||
|
|
||||||
|
Status
|
||||||
|
------
|
||||||
|
|
||||||
|
This is a WIP.
|
||||||
|
Handles 1% of all opcodes
|
||||||
|
Right now, this is just example of how a backend should glue
|
||||||
|
with the generic rig API.
|
||||||
|
|
||||||
|
This lib should/will support the ic706, ic706mkII, ic706mkIIG, and
|
||||||
|
any other CI-V rig.
|
||||||
|
|
||||||
|
Warnings
|
||||||
|
--------
|
||||||
|
|
||||||
|
1. NOTHING IS WORKING, this is WIP.
|
||||||
|
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
hamlib - (C) Frank Singleton 2000
|
||||||
|
|
||||||
|
TODO.icom - Copyright (C) 2000 Stephane Fillod
|
||||||
|
This shared library provides an API for communicating
|
||||||
|
via serial interface to an ICOM using the "CI-V" interface.
|
||||||
|
|
||||||
|
TODO
|
||||||
|
----
|
||||||
|
|
||||||
|
0. complete this TODO list :)
|
||||||
|
1. Complete Cn/Sc codes
|
||||||
|
2. Write (more) extensive Test Suite
|
||||||
|
4. write a gentable script to generate C structs from rig list file
|
||||||
|
5. write a basic (G)UI to easily edit rig caps and generate C structs
|
||||||
|
6. maybe share freq2bcd and bcd2freq with other rigs?
|
||||||
|
7. more than one Icom can share the same serial port!! (->check with frontend)
|
||||||
|
8.
|
||||||
|
|
||||||
|
DONE
|
||||||
|
----
|
||||||
|
|
||||||
|
3. rename ic706 -> icom and make it generic!
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
||||||
|
*
|
||||||
|
* icom.h - Copyright (C) 2000 Stephane Fillod
|
||||||
|
* This shared library provides an API for communicating
|
||||||
|
* via serial interface to an ICOM using the "CI-V" interface.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* $Id: icom.h,v 1.1 2000-09-16 01:43:48 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ICOM_H
|
||||||
|
#define _ICOM_H 1
|
||||||
|
|
||||||
|
|
||||||
|
struct icom_priv_data {
|
||||||
|
unsigned char re_civ_addr; /* the remote equipment's CI-V address*/
|
||||||
|
int civ_731_mode; /* Off: freqs on 10 digits, On: freqs on 8 digits */
|
||||||
|
};
|
||||||
|
|
||||||
|
int icom_init(RIG *rig);
|
||||||
|
int icom_cleanup(RIG *rig);
|
||||||
|
int icom_set_freq_main_vfo_hz(RIG *rig, freq_t freq, rig_mode_t mode);
|
||||||
|
|
||||||
|
/* helper functions */
|
||||||
|
int make_cmd_frame(char frame[], char re_id, char cmd, int subcmd, const char *data, int data_len);
|
||||||
|
int make_cmd_frame_freq(char frame[], char re_id, char cmd, int subcmd, freq_t freq, int ic731_mode);
|
||||||
|
int make_cmd_frame_chan(char frame[], char re_id,char cmd,int subcmd,int chan);
|
||||||
|
|
||||||
|
#endif /* _ICOM_H */
|
||||||
|
|
Ładowanie…
Reference in New Issue