kopia lustrzana https://github.com/Hamlib/Hamlib
Move ???PORT() macro definitions back to rig.h
Many (most?) of the uses of the port structures in Hamlib are to pass through to the basic I/O routines (rig_flush(), write_block(), read_string()), without referencing any of the structure data. Don't bother including port.h if it won't be used. The ???PORT macros are independent of actual hamlib_port_t data use.pull/1802/head
rodzic
80cfadadb0
commit
f3e9a859ed
|
@ -28,7 +28,6 @@
|
|||
#include "register.h"
|
||||
|
||||
#include "kpa.h"
|
||||
#include "hamlib/port.h"
|
||||
|
||||
|
||||
struct kpa_priv_data *kpa1500_priv;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "register.h"
|
||||
|
||||
#include "gemini.h"
|
||||
#include "hamlib/port.h"
|
||||
|
||||
struct gemini_priv_data *gemini_priv;
|
||||
/*
|
||||
|
|
|
@ -178,15 +178,7 @@ typedef hamlib_port_t_deprecated port_t_deprecated;
|
|||
typedef hamlib_port_t port_t;
|
||||
#endif
|
||||
|
||||
#if defined(IN_HAMLIB)
|
||||
/* These are for internal use only */
|
||||
#define RIGPORT(r) (&(r)->state.rigport)
|
||||
#define PTTPORT(r) (&(r)->state.pttport)
|
||||
#define DCDPORT(r) (&(r)->state.dcdport)
|
||||
#define AMPPORT(a) (&(a)->state.ampport)
|
||||
#define ROTPORT(r) (&(r)->state.rotport)
|
||||
#define ROTPORT2(r) (&(r)->state.rotport2)
|
||||
#endif
|
||||
// Macros for app access to hamlib_port_t data
|
||||
#define HAMLIB_RIGPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_RIGPORT))
|
||||
#define HAMLIB_PTTPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_PTTPORT))
|
||||
#define HAMLIB_DCDPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_DCDPORT))
|
||||
|
|
|
@ -2385,13 +2385,13 @@ __BEGIN_DECLS
|
|||
// Note: Experimental, and subject to change!!
|
||||
#if defined(IN_HAMLIB)
|
||||
/* These are for internal use only */
|
||||
//Moved to include/hamlib/port.h #define RIGPORT(r) (&r->state.rigport)
|
||||
// " " " #define PTTPORT(r) (&r->state.pttport)
|
||||
// " " " #define DCDPORT(r) (&r->state.dcdport)
|
||||
#define RIGPORT(r) (&(r)->state.rigport)
|
||||
#define PTTPORT(r) (&(r)->state.pttport)
|
||||
#define DCDPORT(r) (&(r)->state.dcdport)
|
||||
//Moved to src/cache.h #define CACHE(r) ((r)->cache_addr)
|
||||
//Moved to include/hamlib/port.h #define AMPPORT(a) (&a->state.ampport)
|
||||
// " " " #define ROTPORT(r) (&r->state.rotport)
|
||||
// " " " #define ROTPORT2(r) (&r->state.rotport2)
|
||||
#define AMPPORT(a) (&(a)->state.ampport)
|
||||
#define ROTPORT(r) (&(r)->state.rotport)
|
||||
#define ROTPORT2(r) (&(r)->state.rotport2)
|
||||
//Moved to include/hamlib/rig_state.h #define STATE(r) (&r->state)
|
||||
//Moved to include/hamlib/amp_state.h #define AMPSTATE(a) (&(a)->state)
|
||||
//Moved to include/hamlib/rot_state.h #define ROTSTATE(r) (&(r)->state)
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#endif
|
||||
|
||||
#include <hamlib/rotator.h>
|
||||
#include "hamlib/port.h"
|
||||
#include "hamlib/rot_state.h"
|
||||
#include "parallel.h"
|
||||
#include "register.h"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <hamlib/rotator.h>
|
||||
#include "hamlib/port.h"
|
||||
#include <pthread.h>
|
||||
#include "iofunc.h"
|
||||
#include "register.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <math.h>
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "iofunc.h"
|
||||
#include "apex.h"
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#endif
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "hamlib/rot_state.h"
|
||||
#include "parallel.h"
|
||||
#include "misc.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <string.h> /* String function definitions */
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "hamlib/rot_state.h"
|
||||
#include "serial.h"
|
||||
#include "register.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <string.h> /* String function definitions */
|
||||
|
||||
#include <hamlib/rotator.h>
|
||||
#include "hamlib/port.h"
|
||||
#include "hamlib/rot_state.h"
|
||||
#include "serial.h"
|
||||
#include "register.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#endif
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "hamlib/rot_state.h"
|
||||
#include "parallel.h"
|
||||
#include "misc.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "serial.h"
|
||||
#include "register.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <string.h> /* String function definitions */
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "serial.h"
|
||||
#include "misc.h"
|
||||
#include "register.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <string.h> /* String function definitions */
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "serial.h"
|
||||
#include "register.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <stdbool.h>
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
#include "hamlib/port.h"
|
||||
#include "serial.h"
|
||||
#include "register.h"
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <fcntl.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "hamlib/port.h"
|
||||
|
||||
|
||||
int gpio_open(hamlib_port_t *port, int output, int on_value)
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
#include "hamlib/port.h"
|
||||
#include "iofunc.h"
|
||||
#include "misc.h"
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
#endif
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
#include "hamlib/port.h"
|
||||
#include "hamlib/rig_state.h"
|
||||
#include "network.h"
|
||||
#include "misc.h"
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
# include <winbase.h>
|
||||
#endif
|
||||
|
||||
#include "hamlib/port.h"
|
||||
#include "parallel.h"
|
||||
|
||||
#ifdef HAVE_LINUX_PPDEV_H
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
#include "hamlib/port.h"
|
||||
|
||||
#ifdef HAVE_LIBUSB_H
|
||||
# include <libusb.h>
|
||||
|
|
Ładowanie…
Reference in New Issue