renamed port_t as hamlib_port_t

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1957 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.4
Stéphane Fillod, F8CFE 2005-04-03 12:27:17 +00:00
rodzic b036bdb032
commit 9fae198566
26 zmienionych plików z 125 dodań i 125 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Rotator backend - SDR-1000
* Copyright (c) 2003-2005 by Stephane Fillod
*
* $Id: sdr1k.c,v 1.8 2005-01-24 23:03:53 fillods Exp $
* $Id: sdr1k.c,v 1.9 2005-04-03 12:27:14 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -413,7 +413,7 @@ int
write_latch (RIG *rig, latch_t which, unsigned value, unsigned mask)
{
struct sdr1k_priv_data *priv = (struct sdr1k_priv_data *)rig->state.priv;
port_t *pport = &rig->state.rigport;
hamlib_port_t *pport = &rig->state.rigport;
if (!(L_EXT <= which && which <= L_DDS1))
return -RIG_EINVAL;

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib Rotator backend - Fodtrack parallel port
* Copyright (c) 2001-2004 by Stephane Fillod
* Copyright (c) 2001-2005 by Stephane Fillod
*
* $Id: fodtrack.c,v 1.7 2004-10-02 20:37:24 fillods Exp $
* $Id: fodtrack.c,v 1.8 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -56,7 +56,7 @@
/* ************************************************************************* */
/** outputs an direction to the interface */
static int setDirection(port_t *port, unsigned char outputvalue, int direction)
static int setDirection(hamlib_port_t *port, unsigned char outputvalue, int direction)
{
unsigned char outputstatus;
@ -96,7 +96,7 @@ static int
fodtrack_set_position(ROT *rot, azimuth_t az, elevation_t el)
{
int retval;
port_t *pport;
hamlib_port_t *pport;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib CI-V backend - low level communication routines
* Copyright (c) 2000-2003 by Stephane Fillod
* Copyright (c) 2000-2005 by Stephane Fillod
*
* $Id: frame.c,v 1.25 2004-09-06 18:10:49 fineware Exp $
* $Id: frame.c,v 1.26 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -260,7 +260,7 @@ static const char icom_block_end[2] = {FI, COL};
* TODO: strips padding/collisions
* FIXME: check return codes/bytes read
*/
int read_icom_frame(port_t *p, unsigned char rxbuffer[])
int read_icom_frame(hamlib_port_t *p, unsigned char rxbuffer[])
{
int i;

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib CI-V backend - low level communication header
* Copyright (c) 2000-2003 by Stephane Fillod
* Copyright (c) 2000-2005 by Stephane Fillod
*
* $Id: frame.h,v 1.13 2003-04-26 09:54:49 fillods Exp $
* $Id: frame.h,v 1.14 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -31,7 +31,7 @@
int make_cmd_frame(char frame[], char re_id, char cmd, int subcmd, const char *data, int data_len);
int icom_transaction (RIG *rig, int cmd, int subcmd, const char *payload, int payload_len, char *data, int *data_len);
int read_icom_frame(port_t *p, unsigned char rxbuffer[]);
int read_icom_frame(hamlib_port_t *p, unsigned char rxbuffer[]);
int rig2icom_mode(RIG *rig, rmode_t mode, pbwidth_t width, unsigned char *md, char *pd);
void icom2rig_mode(RIG *rig, unsigned char md, int pd, rmode_t *mode, pbwidth_t *width);

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib CI-V backend - OptoScan extensions
* Copyright (c) 2000-2004 by Stephane Fillod
* Copyright (c) 2000-2005 by Stephane Fillod
*
* $Id: optoscan.c,v 1.12 2004-10-02 20:18:16 fillods Exp $
* $Id: optoscan.c,v 1.13 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -677,7 +677,7 @@ static int optoscan_send_freq(RIG *rig,pltstate_t *state)
unsigned char buff[OPTO_BUFF_SIZE];
struct icom_priv_data *priv;
struct rig_state *rs;
const port_t *port;
const hamlib_port_t *port;
int fd;
char md,pd;
freq_t freq;

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - Rotator API header
* Copyright (c) 2000-2005 by Stephane Fillod
*
* $Id: rotator.h,v 1.12 2005-03-26 23:33:39 fillods Exp $
* $Id: rotator.h,v 1.13 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -319,7 +319,7 @@ extern HAMLIB_EXPORT(int) rot_unregister HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int) rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps*, rig_ptr_t), rig_ptr_t data));
extern HAMLIB_EXPORT(int) rot_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int) rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int) rot_load_all_backends HAMLIB_PARAMS(());
extern HAMLIB_EXPORT(int) rot_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(rot_model_t) rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int) rot_token_foreach HAMLIB_PARAMS((ROT *rot, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data));

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib KIT backend - Sat-Schneider DRT1/SAD1 DRM receiver description
* Copyright (c) 2004-2005 by Stephane Fillod
*
* $Id: drt1.c,v 1.3 2005-01-24 23:04:16 fillods Exp $
* $Id: drt1.c,v 1.4 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@ -295,7 +295,7 @@ static int ad_delay(int m)
return j;
}
static int ad_sdio(port_t *port, int i)
static int ad_sdio(hamlib_port_t *port, int i)
{
int ret;
@ -309,7 +309,7 @@ static int ad_sdio(port_t *port, int i)
return ret;
}
static int ad_sclk(port_t *port, int i)
static int ad_sclk(hamlib_port_t *port, int i)
{
int ret;
@ -323,7 +323,7 @@ static int ad_sclk(port_t *port, int i)
return ret;
}
static int ad_ioupd(port_t *port, int i)
static int ad_ioupd(hamlib_port_t *port, int i)
{
int ret;
@ -337,7 +337,7 @@ static int ad_ioupd(port_t *port, int i)
return ret;
}
static int ad_write_reg(port_t *port, unsigned addr, unsigned nb_bytes, unsigned data)
static int ad_write_reg(hamlib_port_t *port, unsigned addr, unsigned nb_bytes, unsigned data)
{
int i;
@ -381,7 +381,7 @@ int drt1_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
unsigned cfr2;
struct drt1_priv_data *priv;
port_t *port = &rig->state.rigport;
hamlib_port_t *port = &rig->state.rigport;
priv = (struct drt1_priv_data*)rig->state.priv;

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib KIT backend - Elektor DRM receiver description
* Copyright (c) 2004-2005 by Stephane Fillod
*
* $Id: elektor304.c,v 1.5 2005-01-24 23:04:21 fillods Exp $
* $Id: elektor304.c,v 1.6 2005-04-03 12:27:15 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@ -246,7 +246,7 @@ static int ad_delay(int m)
return j;
}
static int ad_sdata(port_t *port, int i)
static int ad_sdata(hamlib_port_t *port, int i)
{
int ret;
@ -260,7 +260,7 @@ static int ad_sdata(port_t *port, int i)
return ret;
}
static int ad_sclk(port_t *port, int i)
static int ad_sclk(hamlib_port_t *port, int i)
{
int ret;
@ -274,7 +274,7 @@ static int ad_sclk(port_t *port, int i)
return ret;
}
static int ad_fsync(port_t *port, int i)
static int ad_fsync(hamlib_port_t *port, int i)
{
int ret;
@ -288,7 +288,7 @@ static int ad_fsync(port_t *port, int i)
return ret;
}
static int ad_write(port_t *port, unsigned data)
static int ad_write(hamlib_port_t *port, unsigned data)
{
unsigned mask=0x8000;
int i;
@ -317,7 +317,7 @@ int elektor304_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
unsigned fhl,fhh,fll,flh;
struct elektor304_priv_data *priv;
port_t *port = &rig->state.rigport;
hamlib_port_t *port = &rig->state.rigport;
priv = (struct elektor304_priv_data*)rig->state.priv;

Wyświetl plik

@ -31,7 +31,7 @@
#include "i2cio_pp.h"
#include "microtune_eval_board_defs.h"
i2cio_pp::i2cio_pp (port_t *pp)
i2cio_pp::i2cio_pp (hamlib_port_t *pp)
{
unsigned char r;
d_pp = pp;

Wyświetl plik

@ -40,7 +40,7 @@
class i2cio_pp : public i2cio {
public:
i2cio_pp (port_t *a_pp);
i2cio_pp (hamlib_port_t *a_pp);
virtual void set_scl (bool state);
virtual void set_sda (bool state);
@ -50,7 +50,7 @@ class i2cio_pp : public i2cio {
virtual void unlock ();
private:
port_t *d_pp;
hamlib_port_t *d_pp;
};
#endif /* _I2CIO_PP_H_ */

Wyświetl plik

@ -32,7 +32,7 @@
class microtune_4702 : public microtune_eval_board {
public:
microtune_4702(port_t *port) : microtune_eval_board (port), d_reference_divider(320), prescaler(false) {}
microtune_4702(hamlib_port_t *port) : microtune_eval_board (port), d_reference_divider(320), prescaler(false) {}
~microtune_4702() {}
/*!

Wyświetl plik

@ -31,7 +31,7 @@
*/
class microtune_4937 : public microtune_eval_board {
public:
microtune_4937(port_t *port) : microtune_eval_board (port), d_reference_divider(640), d_fast_tuning_p(false) {}
microtune_4937(hamlib_port_t *port) : microtune_eval_board (port), d_reference_divider(640), d_fast_tuning_p(false) {}
~microtune_4937() {}
/*!

Wyświetl plik

@ -37,7 +37,7 @@
static int AGC_DAC_I2C_ADDR = 0x2C;
microtune_eval_board::microtune_eval_board (port_t *port)
microtune_eval_board::microtune_eval_board (hamlib_port_t *port)
{
m_ppio = port;
m_i2cio = new i2cio_pp (m_ppio);

Wyświetl plik

@ -41,7 +41,7 @@ class i2c;
*/
class microtune_eval_board {
public:
microtune_eval_board (port_t *port);
microtune_eval_board (hamlib_port_t *port);
virtual ~microtune_eval_board ();
//! is the eval board present?
@ -96,7 +96,7 @@ private:
void write_dac (int which, int value);
void write_both_dacs (int val0, int val1);
port_t *m_ppio;
hamlib_port_t *m_ppio;
i2cio *m_i2cio;
i2c *m_i2c;
};

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - generic file based io functions
* Copyright (c) 2000-2004 by Stephane Fillod and Frank Singleton
*
* $Id: iofunc.c,v 1.13 2004-10-02 10:32:08 fillods Exp $
* $Id: iofunc.c,v 1.14 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -75,7 +75,7 @@
* it could work very well also with any file handle, like a socket.
*/
int HAMLIB_API write_block(port_t *p, const char *txbuffer, size_t count)
int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count)
{
int i;
@ -147,7 +147,7 @@ int HAMLIB_API write_block(port_t *p, const char *txbuffer, size_t count)
* it could work very well also with any file handle, like a socket.
*/
int HAMLIB_API read_block(port_t *p, char *rxbuffer, size_t count)
int HAMLIB_API read_block(hamlib_port_t *p, char *rxbuffer, size_t count)
{
fd_set rfds;
struct timeval tv, tv_timeout;
@ -215,7 +215,7 @@ int HAMLIB_API read_block(port_t *p, char *rxbuffer, size_t count)
*
* Assumes rxbuffer!=NULL
*/
int HAMLIB_API read_string(port_t *p, char *rxbuffer, size_t rxmax, const char *stopset,
int HAMLIB_API read_string(hamlib_port_t *p, char *rxbuffer, size_t rxmax, const char *stopset,
int stopset_len)
{
fd_set rfds;

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib Interface - io function header
* Copyright (c) 2000,2001,2002 by Stephane Fillod and Frank Singleton
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
*
* $Id: iofunc.h,v 1.4 2004-08-10 21:00:13 fillods Exp $
* $Id: iofunc.h,v 1.5 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -27,9 +27,9 @@
#include <hamlib/rig.h>
extern HAMLIB_EXPORT(int) read_block(port_t *p, char *rxbuffer, size_t count);
extern HAMLIB_EXPORT(int) write_block(port_t *p, const char *txbuffer, size_t count);
extern HAMLIB_EXPORT(int) read_string(port_t *p, char *rxbuffer, size_t rxmax, const char *stopset, int stopset_len);
extern HAMLIB_EXPORT(int) read_block(hamlib_port_t *p, char *rxbuffer, size_t count);
extern HAMLIB_EXPORT(int) write_block(hamlib_port_t *p, const char *txbuffer, size_t count);
extern HAMLIB_EXPORT(int) read_string(hamlib_port_t *p, char *rxbuffer, size_t rxmax, const char *stopset, int stopset_len);
#endif /* _IOFUNC_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - parallel communication low-level support
* Copyright (c) 2000-2005 by Stephane Fillod
*
* $Id: parallel.c,v 1.2 2005-02-20 02:38:27 fillods Exp $
* $Id: parallel.c,v 1.3 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -89,7 +89,7 @@
* void parport_cleanup() { ioctl(fd, PPRELEASE); }
*/
int par_open(port_t *port)
int par_open(hamlib_port_t *port)
{
int fd;
int mode;
@ -133,7 +133,7 @@ int par_open(port_t *port)
return fd;
}
int par_close(port_t *port)
int par_close(hamlib_port_t *port)
{
#ifdef HAVE_LINUX_PPDEV_H
#elif defined(HAVE_DEV_PPBUS_PPI_H)
@ -144,7 +144,7 @@ int par_close(port_t *port)
return close(port->fd);
}
int HAMLIB_API par_write_data(port_t *port, unsigned char data)
int HAMLIB_API par_write_data(hamlib_port_t *port, unsigned char data)
{
#ifdef HAVE_LINUX_PPDEV_H
int status;
@ -165,7 +165,7 @@ int HAMLIB_API par_write_data(port_t *port, unsigned char data)
return -RIG_ENIMPL;
}
int HAMLIB_API par_read_data(port_t *port, unsigned char *data)
int HAMLIB_API par_read_data(hamlib_port_t *port, unsigned char *data)
{
#ifdef HAVE_LINUX_PPDEV_H
int status;
@ -190,7 +190,7 @@ int HAMLIB_API par_read_data(port_t *port, unsigned char *data)
}
int HAMLIB_API par_write_control(port_t *port, unsigned char control)
int HAMLIB_API par_write_control(hamlib_port_t *port, unsigned char control)
{
#ifdef HAVE_LINUX_PPDEV_H
int status;
@ -228,7 +228,7 @@ int HAMLIB_API par_write_control(port_t *port, unsigned char control)
return -RIG_ENIMPL;
}
int HAMLIB_API par_read_control(port_t *port, unsigned char *control)
int HAMLIB_API par_read_control(hamlib_port_t *port, unsigned char *control)
{
#ifdef HAVE_LINUX_PPDEV_H
int status;
@ -257,7 +257,7 @@ int HAMLIB_API par_read_control(port_t *port, unsigned char *control)
}
int HAMLIB_API par_read_status(port_t *port, unsigned char *status)
int HAMLIB_API par_read_status(hamlib_port_t *port, unsigned char *status)
{
#ifdef HAVE_LINUX_PPDEV_H
int ret;
@ -286,7 +286,7 @@ int HAMLIB_API par_read_status(port_t *port, unsigned char *status)
}
int HAMLIB_API par_lock(port_t *port)
int HAMLIB_API par_lock(hamlib_port_t *port)
{
#ifdef HAVE_LINUX_PPDEV_H
if (ioctl(port->fd, PPCLAIM) < 0) {
@ -301,7 +301,7 @@ int HAMLIB_API par_lock(port_t *port)
return -RIG_ENIMPL;
}
int HAMLIB_API par_unlock(port_t *port)
int HAMLIB_API par_unlock(hamlib_port_t *port)
{
#ifdef HAVE_LINUX_PPDEV_H
if (ioctl(port->fd, PPRELEASE) < 0) {
@ -317,7 +317,7 @@ int HAMLIB_API par_unlock(port_t *port)
}
int par_ptt_set(port_t *p, ptt_t pttx)
int par_ptt_set(hamlib_port_t *p, ptt_t pttx)
{
switch(p->type.ptt) {
case RIG_PTT_PARALLEL:
@ -346,7 +346,7 @@ int par_ptt_set(port_t *p, ptt_t pttx)
/*
* assumes pttx not NULL
*/
int par_ptt_get(port_t *p, ptt_t *pttx)
int par_ptt_get(hamlib_port_t *p, ptt_t *pttx)
{
switch(p->type.ptt) {
case RIG_PTT_PARALLEL:
@ -370,7 +370,7 @@ int par_ptt_get(port_t *p, ptt_t *pttx)
/*
* assumes dcdx not NULL
*/
int par_dcd_get(port_t *p, dcd_t *dcdx)
int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx)
{
switch(p->type.dcd) {
case RIG_DCD_PARALLEL:

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib Interface - parallel communication header
* Copyright (c) 2000-2004 by Stephane Fillod and Frank Singleton
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
*
* $Id: parallel.h,v 1.1 2004-10-02 20:37:24 fillods Exp $
* $Id: parallel.h,v 1.2 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -29,19 +29,19 @@
__BEGIN_DECLS
/* Hamlib internal use, see rig.c */
int par_open(port_t *p);
int par_close(port_t *p);
int par_ptt_set(port_t *p, ptt_t pttx);
int par_ptt_get(port_t *p, ptt_t *pttx);
int par_dcd_get(port_t *p, dcd_t *dcdx);
int par_open(hamlib_port_t *p);
int par_close(hamlib_port_t *p);
int par_ptt_set(hamlib_port_t *p, ptt_t pttx);
int par_ptt_get(hamlib_port_t *p, ptt_t *pttx);
int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx);
extern HAMLIB_EXPORT(int) par_write_data(port_t *p, unsigned char data);
extern HAMLIB_EXPORT(int) par_write_control(port_t *p, unsigned char control);
extern HAMLIB_EXPORT(int) par_read_data(port_t *p, unsigned char *data);
extern HAMLIB_EXPORT(int) par_read_control(port_t *p, unsigned char *control);
extern HAMLIB_EXPORT(int) par_read_status(port_t *p, unsigned char *status);
extern HAMLIB_EXPORT(int) par_lock(port_t *p);
extern HAMLIB_EXPORT(int) par_unlock(port_t *p);
extern HAMLIB_EXPORT(int) par_write_data(hamlib_port_t *p, unsigned char data);
extern HAMLIB_EXPORT(int) par_write_control(hamlib_port_t *p, unsigned char control);
extern HAMLIB_EXPORT(int) par_read_data(hamlib_port_t *p, unsigned char *data);
extern HAMLIB_EXPORT(int) par_read_control(hamlib_port_t *p, unsigned char *control);
extern HAMLIB_EXPORT(int) par_read_status(hamlib_port_t *p, unsigned char *status);
extern HAMLIB_EXPORT(int) par_lock(hamlib_port_t *p);
extern HAMLIB_EXPORT(int) par_unlock(hamlib_port_t *p);
__END_DECLS

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib Interface - provides registering for dynamically loadable backends.
* Copyright (c) 2000-2004 by Stephane Fillod
* Copyright (c) 2000-2005 by Stephane Fillod
*
* $Id: register.c,v 1.21 2004-10-02 10:32:08 fillods Exp $
* $Id: register.c,v 1.22 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -53,7 +53,7 @@
static struct {
int be_num;
const char *be_name;
rig_model_t (* be_probe_all)(port_t*, rig_probe_func_t, rig_ptr_t);
rig_model_t (* be_probe_all)(hamlib_port_t*, rig_probe_func_t, rig_ptr_t);
} rig_backend_list[RIG_BACKEND_MAX] = RIG_BACKEND_LIST;
@ -221,7 +221,7 @@ int HAMLIB_API rig_list_foreach(int (*cfunc)(const struct rig_caps*, rig_ptr_t),
return RIG_OK;
}
static int dummy_rig_probe(const port_t *p, rig_model_t model, rig_ptr_t data)
static int dummy_rig_probe(const hamlib_port_t *p, rig_model_t model, rig_ptr_t data)
{
rig_debug(RIG_DEBUG_TRACE, "Found rig, model %d\n", model);
return RIG_OK;
@ -231,7 +231,7 @@ static int dummy_rig_probe(const port_t *p, rig_model_t model, rig_ptr_t data)
* rig_probe_first
* called straight by rig_probe
*/
rig_model_t rig_probe_first(port_t *p)
rig_model_t rig_probe_first(hamlib_port_t *p)
{
int i;
rig_model_t model;
@ -251,7 +251,7 @@ rig_model_t rig_probe_first(port_t *p)
* rig_probe_all_backends
* called straight by rig_probe_all
*/
int rig_probe_all_backends(port_t *p, rig_probe_func_t cfunc, rig_ptr_t data)
int rig_probe_all_backends(hamlib_port_t *p, rig_probe_func_t cfunc, rig_ptr_t data)
{
int i;
@ -355,7 +355,7 @@ int HAMLIB_API rig_load_backend(const char *be_name)
if (!strncmp(be_name, rig_backend_list[i].be_name, 64)) {
snprintf(probefname, MAXFUNCNAMELEN, "probeallrigs%d_%s", ABI_VERSION, be_name);
rig_backend_list[i].be_probe_all =
(rig_model_t (*)(port_t*, rig_probe_func_t, rig_ptr_t))
(rig_model_t (*)(hamlib_port_t*, rig_probe_func_t, rig_ptr_t))
lt_dlsym (be_handle, probefname);
break;
}

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib Interface - plugin registration
* Copyright (c) 2003 by Stephane Fillod
* Copyright (c) 2003-2005 by Stephane Fillod
*
* $Id: register.h,v 1.4 2003-11-16 22:32:21 fillods Exp $
* $Id: register.h,v 1.5 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -40,7 +40,7 @@
#ifdef DECLARE_PROBERIG_BACKEND
#undef DECLARE_PROBERIG_BACKEND
#endif
#define DECLARE_PROBERIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rig_model_t) probeallrigs2_##backend(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
#define DECLARE_PROBERIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rig_model_t) probeallrigs2_##backend(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
#ifdef DECLARE_INITROT_BACKEND
#undef DECLARE_INITROT_BACKEND
@ -50,6 +50,6 @@
#ifdef DECLARE_PROBEROT_BACKEND
#undef DECLARE_PROBEROT_BACKEND
#endif
#define DECLARE_PROBEROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rot_model_t) probeallrots2_##backend(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
#define DECLARE_PROBEROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rot_model_t) probeallrots2_##backend(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
#endif /* _REGISTER_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - main file
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
*
* $Id: rig.c,v 1.86 2005-03-26 17:57:14 fillods Exp $
* $Id: rig.c,v 1.87 2005-04-03 12:27:16 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -2360,8 +2360,8 @@ int HAMLIB_API rig_reset(RIG *rig, reset_t reset)
return rig->caps->reset(rig, reset);
}
extern int rig_probe_first(port_t *p);
extern int rig_probe_all_backends(port_t *p, rig_probe_func_t cfunc, rig_ptr_t data);
extern int rig_probe_first(hamlib_port_t *p);
extern int rig_probe_all_backends(hamlib_port_t *p, rig_probe_func_t cfunc, rig_ptr_t data);
/**
* \brief try to guess a rig
* \param port A pointer describing a port linking the host to the rig
@ -2376,7 +2376,7 @@ extern int rig_probe_all_backends(port_t *p, rig_probe_func_t cfunc, rig_ptr_t d
* \return the rig model id according to the rig_model_t type if found,
* otherwise RIG_MODEL_NONE if unable to determine rig model.
*/
rig_model_t HAMLIB_API rig_probe(port_t *port)
rig_model_t HAMLIB_API rig_probe(hamlib_port_t *port)
{
if (!port)
return RIG_MODEL_NONE;
@ -2401,7 +2401,7 @@ rig_model_t HAMLIB_API rig_probe(port_t *port)
* a negative value if an error occured (in which case, cause is
* set appropriately).
*/
int HAMLIB_API rig_probe_all(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
int HAMLIB_API rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
{
if (!port)
return -RIG_EINVAL;

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - provides registering for dynamically loadable backends.
* Copyright (c) 2000-2004 by Stephane Fillod
*
* $Id: rot_reg.c,v 1.7 2004-10-02 10:32:08 fillods Exp $
* $Id: rot_reg.c,v 1.8 2005-04-03 12:27:17 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -53,7 +53,7 @@
static struct {
int be_num;
const char *be_name;
rot_model_t (*be_probe)(port_t *);
rot_model_t (*be_probe)(hamlib_port_t *);
} rot_backend_list[ROT_BACKEND_MAX] = ROT_BACKEND_LIST;
@ -225,7 +225,7 @@ int HAMLIB_API rot_list_foreach(int (*cfunc)(const struct rot_caps*, rig_ptr_t),
* rot_probe_all
* called straight by rot_probe
*/
rot_model_t HAMLIB_API rot_probe_all(port_t *p)
rot_model_t HAMLIB_API rot_probe_all(hamlib_port_t *p)
{
int i;
rot_model_t rot_model;
@ -329,7 +329,7 @@ int HAMLIB_API rot_load_backend(const char *be_name)
for (i=0; i<ROT_BACKEND_MAX && rot_backend_list[i].be_name; i++) {
if (!strncmp(be_name, rot_backend_list[i].be_name, 64)) {
snprintf(probefname, MAXFUNCNAMELEN, "probeallrots%d_%s", ABI_VERSION, be_name);
rot_backend_list[i].be_probe = (rot_model_t (*)(port_t *))
rot_backend_list[i].be_probe = (rot_model_t (*)(hamlib_port_t *))
lt_dlsym (be_handle, probefname);
break;
}

Wyświetl plik

@ -1,10 +1,10 @@
/*
* Hamlib Interface - serial communication low-level support
* Copyright (c) 2000-2004 by Stephane Fillod and Frank Singleton
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
* Parts of the PTT handling are derived from soundmodem, an excellent
* ham packet softmodem written by Thomas Sailer, HB9JNX.
*
* $Id: serial.c,v 1.43 2004-10-02 20:37:24 fillods Exp $
* $Id: serial.c,v 1.44 2005-04-03 12:27:17 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -85,7 +85,7 @@
*
*/
int HAMLIB_API serial_open(port_t *rp) {
int HAMLIB_API serial_open(hamlib_port_t *rp) {
int fd; /* File descriptor for the port */
int err;
@ -119,7 +119,7 @@ int HAMLIB_API serial_open(port_t *rp) {
}
int HAMLIB_API serial_setup(port_t *rp)
int HAMLIB_API serial_setup(hamlib_port_t *rp)
{
int fd;
/* There's a lib replacement for termios under Mingw */
@ -360,24 +360,24 @@ int HAMLIB_API serial_setup(port_t *rp)
* Flush all characters waiting in RX buffer.
*/
int HAMLIB_API serial_flush( port_t *p )
int HAMLIB_API serial_flush(hamlib_port_t *p )
{
tcflush(p->fd, TCIFLUSH);
return RIG_OK;
}
int ser_open(port_t *p)
int ser_open(hamlib_port_t *p)
{
return (p->fd = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY));
}
int ser_close(port_t *p)
int ser_close(hamlib_port_t *p)
{
return CLOSE(p->fd);
}
int HAMLIB_API ser_set_rts(port_t *p, int state)
int HAMLIB_API ser_set_rts(hamlib_port_t *p, int state)
{
unsigned int y = TIOCM_RTS;
@ -400,7 +400,7 @@ int HAMLIB_API ser_set_rts(port_t *p, int state)
* assumes state not NULL
* p is supposed to be &rig->state.rigport
*/
int HAMLIB_API ser_get_rts(port_t *p, int *state)
int HAMLIB_API ser_get_rts(hamlib_port_t *p, int *state)
{
int retcode;
unsigned int y;
@ -411,7 +411,7 @@ int HAMLIB_API ser_get_rts(port_t *p, int *state)
return retcode < 0 ? -RIG_EIO : RIG_OK;
}
int HAMLIB_API ser_set_dtr(port_t *p, int state)
int HAMLIB_API ser_set_dtr(hamlib_port_t *p, int state)
{
unsigned int y = TIOCM_DTR;
@ -430,7 +430,7 @@ int HAMLIB_API ser_set_dtr(port_t *p, int state)
#endif
}
int HAMLIB_API ser_get_dtr(port_t *p, int *state)
int HAMLIB_API ser_get_dtr(hamlib_port_t *p, int *state)
{
int retcode;
unsigned int y;
@ -441,7 +441,7 @@ int HAMLIB_API ser_get_dtr(port_t *p, int *state)
return retcode < 0 ? -RIG_EIO : RIG_OK;
}
int HAMLIB_API ser_set_brk(port_t *p, int state)
int HAMLIB_API ser_set_brk(hamlib_port_t *p, int state)
{
#if defined(TIOCSBRK) && defined(TIOCCBRK)
return IOCTL(p->fd, state ? TIOCSBRK : TIOCCBRK, 0 ) < 0 ?
@ -455,7 +455,7 @@ int HAMLIB_API ser_set_brk(port_t *p, int state)
* assumes state not NULL
* p is supposed to be &rig->state.rigport
*/
int HAMLIB_API ser_get_car(port_t *p, int *state)
int HAMLIB_API ser_get_car(hamlib_port_t *p, int *state)
{
int retcode;
unsigned int y;
@ -466,7 +466,7 @@ int HAMLIB_API ser_get_car(port_t *p, int *state)
return retcode < 0 ? -RIG_EIO : RIG_OK;
}
int HAMLIB_API ser_get_cts(port_t *p, int *state)
int HAMLIB_API ser_get_cts(hamlib_port_t *p, int *state)
{
int retcode;
unsigned int y;
@ -477,7 +477,7 @@ int HAMLIB_API ser_get_cts(port_t *p, int *state)
return retcode < 0 ? -RIG_EIO : RIG_OK;
}
int HAMLIB_API ser_get_dsr(port_t *p, int *state)
int HAMLIB_API ser_get_dsr(hamlib_port_t *p, int *state)
{
int retcode;
unsigned int y;

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib Interface - serial communication header
* Copyright (c) 2000-2004 by Stephane Fillod and Frank Singleton
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
*
* $Id: serial.h,v 1.26 2004-10-02 20:37:24 fillods Exp $
* $Id: serial.h,v 1.27 2005-04-03 12:27:17 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -28,21 +28,21 @@
__BEGIN_DECLS
extern HAMLIB_EXPORT(int) serial_open(port_t *rs);
extern HAMLIB_EXPORT(int) serial_setup(port_t *rs);
extern HAMLIB_EXPORT(int) serial_flush(port_t *p);
extern HAMLIB_EXPORT(int) serial_open(hamlib_port_t *rs);
extern HAMLIB_EXPORT(int) serial_setup(hamlib_port_t *rs);
extern HAMLIB_EXPORT(int) serial_flush(hamlib_port_t *p);
/* Hamlib internal use, see rig.c */
int ser_open(port_t *p);
int ser_close(port_t *p);
extern HAMLIB_EXPORT(int) ser_set_rts(port_t *p, int state);
extern HAMLIB_EXPORT(int) ser_get_rts(port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_set_brk(port_t *p, int state);
extern HAMLIB_EXPORT(int) ser_set_dtr(port_t *p, int state);
extern HAMLIB_EXPORT(int) ser_get_dtr(port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_get_cts(port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_get_dsr(port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_get_car(port_t *p, int *state);
int ser_open(hamlib_port_t *p);
int ser_close(hamlib_port_t *p);
extern HAMLIB_EXPORT(int) ser_set_rts(hamlib_port_t *p, int state);
extern HAMLIB_EXPORT(int) ser_get_rts(hamlib_port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_set_brk(hamlib_port_t *p, int state);
extern HAMLIB_EXPORT(int) ser_set_dtr(hamlib_port_t *p, int state);
extern HAMLIB_EXPORT(int) ser_get_dtr(hamlib_port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_get_cts(hamlib_port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_get_dsr(hamlib_port_t *p, int *state);
extern HAMLIB_EXPORT(int) ser_get_car(hamlib_port_t *p, int *state);
__END_DECLS

Wyświetl plik

@ -30,7 +30,7 @@ int main (int argc, char *argv[])
*/
if (argc < 2) {
port_t myport;
hamlib_port_t myport;
/* may be overriden by backend probe */
myport.type.rig = RIG_PORT_SERIAL;
myport.parm.serial.rate = 9600;

Wyświetl plik

@ -29,7 +29,7 @@ int main (int argc, char *argv[])
*/
if (argc < 2) {
port_t myport;
hamlib_port_t myport;
/* may be overriden by backend probe */
myport.type.rig = RIG_PORT_SERIAL;
myport.parm.serial.rate = 9600;