From 706b534d759965137639e37d96f79aedcb2c93c8 Mon Sep 17 00:00:00 2001 From: "Frank Singleton, VK3FCS" Date: Mon, 4 Sep 2000 03:38:12 +0000 Subject: [PATCH] starting to add rig_caps stuff git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@79 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- ft847/ft847.c | 29 ++++++++++++++++++++++++++++- ft847/ft847.h | 3 ++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ft847/ft847.c b/ft847/ft847.c index fa4266655..b6d97054e 100644 --- a/ft847/ft847.c +++ b/ft847/ft847.c @@ -6,7 +6,7 @@ * via serial interface to an FT-847 using the "CAT" interface. * * - * $Id: ft847.c,v 1.16 2000-08-19 04:07:00 javabear Exp $ + * $Id: ft847.c,v 1.17 2000-09-04 03:36:15 javabear Exp $ * * * @@ -35,6 +35,7 @@ #include /* POSIX terminal control definitions */ #include +#include "rig.h" #include "serial.h" #include "ft847.h" @@ -48,6 +49,10 @@ static long int calc_freq_from_packed4(unsigned char *in); static void calc_packed4_from_freq(long int freq, unsigned char *out); +static struct rig_caps rigft847 = { + "ft847", 4800, 56000, 8, 2, RIG_PARITY_NONE +}; + /* * Allowable DCS Codes @@ -92,6 +97,28 @@ int rig_close(int fd) { return close_port(fd); } + +/* + * Gets rig capabilities. + * + */ + +struct rig_caps *rig_get_caps() { + + struct rig_caps *r; + r = &rigft847; + + printf("rig = %s \n", r->rig_name); + + printf("rig = %s \n", rigft847.rig_name); + + printf("rig serial_rate_min = = %u \n", rigft847.serial_rate_min); + + + return &rigft847; +} + + /* * Implement OPCODES */ diff --git a/ft847/ft847.h b/ft847/ft847.h index 78b60446d..ccdcbd99f 100644 --- a/ft847/ft847.h +++ b/ft847/ft847.h @@ -6,7 +6,7 @@ * via serial interface to an FT-847 using the "CAT" interface. * * - * $Id: ft847.h,v 1.10 2000-08-19 04:07:00 javabear Exp $ + * $Id: ft847.h,v 1.11 2000-09-04 03:38:12 javabear Exp $ * * * This program is free software; you can redistribute it and/or @@ -84,6 +84,7 @@ const unsigned char CTCSS_ENC_DEC_OFF = 0x2a; int rig_open(char *serial_port); /* return fd or -1 on error */ int rig_close(int fd); +struct rig_caps *rig_get_caps(); /* return ptr to capabilities */ /*