From 4490b9560b8a8f1116866d8a37f6d89467c372c5 Mon Sep 17 00:00:00 2001 From: "Frank Singleton, VK3FCS" Date: Mon, 2 Oct 2000 00:02:03 +0000 Subject: [PATCH] added ft747_open and ft747_close git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@180 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- ft747/ft747.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- ft747/ft747.h | 12 ++++++++++-- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/ft747/ft747.c b/ft747/ft747.c index f2d401518..620188939 100644 --- a/ft747/ft747.c +++ b/ft747/ft747.c @@ -7,7 +7,7 @@ * box (FIF-232C) or similar * * - * $Id: ft747.c,v 1.13 2000-09-24 03:35:39 javabear Exp $ + * $Id: ft747.c,v 1.14 2000-10-02 00:02:03 javabear Exp $ * * * This program is free software; you can redistribute it and/or @@ -121,8 +121,8 @@ const struct rig_caps ft747_caps = { }, ft747_init, ft747_cleanup, - NULL, /* port opened */ - NULL, /* port closed */ + ft747_open, /* port opened */ + ft747_close, /* port closed */ NULL, /* probe not supported yet */ ft747_set_freq, /* set freq */ @@ -155,6 +155,7 @@ static const struct ft747_priv_data ft747_priv = { 747 }; /* dummy atm */ * serial port is already open (rig->state->fd) */ + int ft747_init(RIG *rig) { struct ft747_priv_data *p; @@ -199,6 +200,44 @@ int ft747_cleanup(RIG *rig) { } +/* + * ft747_open routine + * + */ + +int ft747_open(RIG *rig) { + struct rig_state *rig_s; + + if (!rig) + return -RIG_EINVAL; + + rig_s = &rig->state; + + /* TODO */ + + return RIG_OK; +} + + +/* + * ft747_close routine + * + */ + +int ft747_close(RIG *rig) { + struct rig_state *rig_s; + + if (!rig) + return -RIG_EINVAL; + + rig_s = &rig->state; + + /* TODO */ + + return RIG_OK; +} + + /* * Example of wrapping backend function inside frontend API * diff --git a/ft747/ft747.h b/ft747/ft747.h index 7864be683..7c276bac4 100644 --- a/ft747/ft747.h +++ b/ft747/ft747.h @@ -7,7 +7,7 @@ * box (FIF-232C) or similar * * - * $Id: ft747.h,v 1.10 2000-09-24 03:36:47 javabear Exp $ + * $Id: ft747.h,v 1.11 2000-10-02 00:01:01 javabear Exp $ * * * This program is free software; you can redistribute it and/or @@ -47,6 +47,8 @@ struct ft747_priv_data { int ft747_init(RIG *rig); int ft747_cleanup(RIG *rig); +int ft747_open(RIG *rig); +int ft747_close(RIG *rig); int ft747_set_freq(RIG *rig, freq_t freq); int ft747_get_freq(RIG *rig, freq_t *freq); @@ -61,6 +63,13 @@ int ft747_set_ptt(RIG *rig, ptt_t ptt); int ft747_get_ptt(RIG *rig, ptt_t *ptt); + +/* + * Below is leftovers of old interface. TODO + * + */ + +#if 0 /* * Allow TX commands to be disabled * @@ -128,7 +137,6 @@ const float band_data[11] = { 0.0, 0.1, 2.5, 4.0, 7.5, 10.5, 14.5, 18.5, 21.5, 2 -#if 0 void cmd_set_split_yes(int fd); void cmd_set_split_no(int fd);