adding rig_caps stuff

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@88 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.0
Frank Singleton, VK3FCS 2000-09-04 19:58:56 +00:00
rodzic a0464dcbed
commit f926ab04ce
4 zmienionych plików z 27 dodań i 13 usunięć

Wyświetl plik

@ -7,7 +7,7 @@
* box (FIF-232C) or similar
*
*
* $Id: ft747.c,v 1.9 2000-09-04 04:07:33 javabear Exp $
* $Id: ft747.c,v 1.10 2000-09-04 19:58:55 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -40,7 +40,7 @@
#include "ft747.h"
static struct rig_caps rigft747 = {
"ft747", 4800, 4800, 8, 2, RIG_PARITY_NONE
"ft747", 4800, 4800, 8, 2, RIG_PARITY_NONE, ""
};
@ -55,8 +55,18 @@ static struct rig_caps rigft747 = {
*/
int rig_open(char *serial_port) {
return open_port(serial_port);
/* int rig_open(char *serial_port) { */
/* return open_port(serial_port); */
/* } */
/*
* Open serial connection to rig using rig_caps
* returns fd.
*/
int rig_open(struct rig_caps *rc) {
return open_port2(rc);
}
/*
@ -80,8 +90,6 @@ struct rig_caps *rig_get_caps() {
printf("rig = %s \n", r->rig_name);
printf("rig = %s \n", rigft747.rig_name);
printf("rig serial_rate_min = = %u \n", rigft747.serial_rate_min);

Wyświetl plik

@ -7,7 +7,7 @@
* box (FIF-232C) or similar
*
*
* $Id: ft747.h,v 1.6 2000-09-04 03:58:06 javabear Exp $
* $Id: ft747.h,v 1.7 2000-09-04 19:58:55 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -87,9 +87,12 @@ const float band_data[11] = { 0.0, 0.1, 2.5, 4.0, 7.5, 10.5, 14.5, 18.5, 21.5, 2
* Visible functions in shared lib.
*
*/
int rig_open(char *serial_port); /* return fd or -1 on error */
/* int rig_open(char *serial_port); */ /* return fd or -1 on error */
int rig_close(int fd); /* close port using fd */
struct rig_caps *rig_get_caps(); /* return ptr to capabilities */
int rig_open(struct rig_caps *rc); /* use rig_caps struct to open */
/*
* set commands

Wyświetl plik

@ -6,7 +6,7 @@
* box (FIF-232C) or similar.
*
*
* $Id: testlibft747.c,v 1.9 2000-09-04 04:06:14 javabear Exp $
* $Id: testlibft747.c,v 1.10 2000-09-04 19:58:55 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -225,10 +225,14 @@ int main(void) {
rc = rig_get_caps(); /* find capabilities */
printf("rig_name = %s \n", rc->rig_name);
strcpy(rc->serial_port_name,SERIAL_PORT); /* put wanted serial port in caps */
fd = rig_open(SERIAL_PORT);
printf("port opened ok \n");
/* fd = rig_open(SERIAL_PORT); */
/* printf("port opened ok \n"); */
fd = rig_open(rc);
printf("port %s opened ok \n", rc->serial_port_name);
test(fd);
printf("testing communication result ok \n");

Wyświetl plik

@ -5,7 +5,7 @@
* via serial interface to an FT-847 using the "CAT" interface.
*
*
* $Id: testlibft847.c,v 1.15 2000-09-04 17:51:35 javabear Exp $
* $Id: testlibft847.c,v 1.16 2000-09-04 19:58:56 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -207,7 +207,6 @@ int main(void) {
rc = rig_get_caps(); /* find capabilities */
printf("rig_name = %s \n", rc->rig_name);
rc->serial_data_bits = 8;
printf("Initial serial_port_name = %s \n", rc->serial_port_name);
strcpy(rc->serial_port_name,SERIAL_PORT); /* put wanted serial port in caps */