libsigrok: Fix #includes.
In the lib, we should only #include "sigrok.h" or "sigrok-internal.h", but not the (possibly installed and thus different/older versions) via <sigrok.h> or <sigrok-internal.h>. Frontends should of course use <sigrok.h> and <sigrok-internal.h>.
This commit is contained in:
parent
a0ecd83bc6
commit
b7f09cf86d
|
@ -17,7 +17,7 @@
|
||||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
AM_CPPFLAGS = -I $(top_srcdir)/libsigrok
|
AM_CPPFLAGS = -I$(top_srcdir)/libsigrok
|
||||||
|
|
||||||
SUBDIRS = hardware input output firmware
|
SUBDIRS = hardware input output firmware
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize libsigrok.
|
* Initialize libsigrok.
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
static gpointer new_chunk(struct sr_datastore **ds);
|
static gpointer new_chunk(struct sr_datastore **ds);
|
||||||
|
|
||||||
|
|
4
device.c
4
device.c
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
static GSList *devices = NULL;
|
static GSList *devices = NULL;
|
||||||
|
|
||||||
|
|
2
filter.c
2
filter.c
|
@ -20,7 +20,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include "sigrok-internal.h"
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sigrok.h>
|
|
||||||
#include <sigrok-internal.h>
|
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
|
#include "sigrok.h"
|
||||||
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
#define NUM_PROBES 2
|
#define NUM_PROBES 2
|
||||||
#define SAMPLE_WIDTH 16
|
#define SAMPLE_WIDTH 16
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
#include <ftdi.h>
|
#include <ftdi.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
#include "asix-sigma.h"
|
#include "asix-sigma.h"
|
||||||
|
|
||||||
#define USB_VENDOR 0xa600
|
#define USB_VENDOR 0xa600
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include <ftdi.h>
|
#include <ftdi.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
#define USB_VENDOR_ID 0x0403
|
#define USB_VENDOR_ID 0x0403
|
||||||
#define USB_PRODUCT_ID 0x6001
|
#define USB_PRODUCT_ID 0x6001
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
* Helper functions for the Cypress EZ-USB / FX2 series chips.
|
* Helper functions for the Cypress EZ-USB / FX2 series chips.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sigrok.h>
|
|
||||||
#include <sigrok-internal.h>
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
@ -30,6 +28,8 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "sigrok.h"
|
||||||
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
int ezusb_reset(struct libusb_device_handle *hdl, int set_clear)
|
int ezusb_reset(struct libusb_device_handle *hdl, int set_clear)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
// FIXME: Must be moved, or rather passed as function argument.
|
// FIXME: Must be moved, or rather passed as function argument.
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sigrok.h>
|
|
||||||
#include <sigrok-internal.h>
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
|
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
|
||||||
#endif
|
#endif
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "sigrok.h"
|
||||||
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/* TODO: Number of probes should be configurable. */
|
/* TODO: Number of probes should be configurable. */
|
||||||
#define NUM_PROBES 8
|
#define NUM_PROBES 8
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <libudev.h>
|
#include <libudev.h>
|
||||||
#include <sigrok.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok.h"
|
||||||
|
#include "sigrok-internal.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "link-mso19.h"
|
#include "link-mso19.h"
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
#include "ols.h"
|
#include "ols.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
#include "saleae-logic.h"
|
#include "saleae-logic.h"
|
||||||
|
|
||||||
static struct fx2_profile supported_fx2[] = {
|
static struct fx2_profile supported_fx2[] = {
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef SALEAE_LOGIC_H_
|
#ifndef SALEAE_LOGIC_H_
|
||||||
#define SALEAE_LOGIC_H_
|
#define SALEAE_LOGIC_H_
|
||||||
|
|
||||||
|
@ -72,9 +71,6 @@ struct fx2_device {
|
||||||
* on the session bus along with samples.
|
* on the session bus along with samples.
|
||||||
*/
|
*/
|
||||||
void *session_data;
|
void *session_data;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* SALEAE_LOGIC_H_ */
|
#endif /* SALEAE_LOGIC_H_ */
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
#include "gl_usb.h"
|
#include "gl_usb.h"
|
||||||
|
|
||||||
#define CTRL_IN (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | \
|
#define CTRL_IN (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | \
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
#include "analyzer.h"
|
#include "analyzer.h"
|
||||||
|
|
||||||
#define USB_VENDOR 0x0c12
|
#define USB_VENDOR 0x0c12
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/* The list of loaded plugins lives here. */
|
/* The list of loaded plugins lives here. */
|
||||||
static GSList *plugins;
|
static GSList *plugins;
|
||||||
|
|
4
log.c
4
log.c
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */
|
static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/* demo.c */
|
/* demo.c */
|
||||||
extern GIOChannel channels[2];
|
extern GIOChannel channels[2];
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <zip.h>
|
#include <zip.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/* size of payloads sent across the session bus */
|
/* size of payloads sent across the session bus */
|
||||||
#define CHUNKSIZE 4096
|
#define CHUNKSIZE 4096
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <zip.h>
|
#include <zip.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
extern struct sr_session *session;
|
extern struct sr_session *session;
|
||||||
extern struct sr_device_plugin session_driver;
|
extern struct sr_device_plugin session_driver;
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sigrok.h>
|
#include "sigrok.h"
|
||||||
#include <sigrok-internal.h>
|
#include "sigrok-internal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a numeric samplerate value to its "natural" string representation.
|
* Convert a numeric samplerate value to its "natural" string representation.
|
||||||
|
|
Loading…
Reference in New Issue