* ASIX Sigma Logic Analyzer Driver
*/
+#include "config.h"
#include <ftdi.h>
#include <string.h>
#include <zlib.h>
#include <sigrok.h>
-#include <config.h>
#include "asix-sigma.h"
#define USB_VENDOR 0xa600
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <stdint.h>
#include <glib.h>
+#ifdef HAVE_LIBUSB_1_0
#include <libusb.h>
+#endif
#include <sigrok.h>
+#ifdef HAVE_LIBUSB_1_0
+
int opendev2(int device_index, struct sr_device_instance **sdi,
libusb_device *dev, struct libusb_device_descriptor *des,
int *skip, uint16_t vid, uint16_t pid, int interface)
return 0;
}
+
+#endif
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <libusb.h>
#include <sigrok.h>
#include <sigrok-internal.h>
-#include "config.h"
#define USB_VENDOR 0x0925
#define USB_PRODUCT 0x3881
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <glib.h>
#include <libusb.h>
#include <sigrok.h>
-#include "config.h"
#include "analyzer.h"
#define USB_VENDOR 0x0c12
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
#include <glib.h>
#include <sigrok.h>
-#include "config.h"
/* The list of loaded plugins lives here. */
GSList *plugins;
void sr_device_instance_free(struct sr_device_instance *sdi)
{
switch (sdi->instance_type) {
+#ifdef HAVE_LIBUSB_1_0
case SR_USB_INSTANCE:
sr_usb_device_instance_free(sdi->usb);
break;
+#endif
case SR_SERIAL_INSTANCE:
sr_serial_device_instance_free(sdi->serial);
break;
free(sdi);
}
+#ifdef HAVE_LIBUSB_1_0
+
struct sr_usb_device_instance *sr_usb_device_instance_new(uint8_t bus,
uint8_t address, struct libusb_device_handle *hdl)
{
/* Nothing to do for this device instance type. */
}
+#endif
+
struct sr_serial_device_instance *sr_serial_device_instance_new(
const char *port, int fd)
{
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <glib.h>
#include <sigrok.h>
-#include <config.h>
/* demo.c */
extern GIOChannel channels[2];
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <zip.h>
#include <glib.h>
#include <sigrok.h>
-#include <config.h>
-
extern struct session *session;
extern struct sr_device_plugin session_driver;
/*--- hardware/common/ezusb.c -----------------------------------------------*/
+#ifdef HAVE_LIBUSB_1_0
int ezusb_reset(struct libusb_device_handle *hdl, int set_clear);
int ezusb_install_firmware(libusb_device_handle *hdl, char *filename);
int ezusb_upload_firmware(libusb_device *dev, int configuration,
const char *filename);
+#endif
/*--- hardware/common/misc.c ------------------------------------------------*/
+#ifdef HAVE_LIBUSB_1_0
int opendev2(int device_index, struct sr_device_instance **sdi,
libusb_device *dev, struct libusb_device_descriptor *des,
int *skip, uint16_t vid, uint16_t pid, int interface);
int opendev3(struct sr_device_instance **sdi, libusb_device *dev,
struct libusb_device_descriptor *des,
uint16_t vid, uint16_t pid, int interface);
+#endif
#endif
void sr_device_instance_free(struct sr_device_instance *sdi);
/* USB-specific instances */
+#ifdef HAVE_LIBUSB_1_0
struct sr_usb_device_instance *sr_usb_device_instance_new(uint8_t bus,
uint8_t address, struct libusb_device_handle *hdl);
void sr_usb_device_instance_free(struct sr_usb_device_instance *usb);
+#endif
/* Serial-specific instances */
struct sr_serial_device_instance *sr_serial_device_instance_new(
#include <stdint.h>
#include <inttypes.h>
#include <glib.h>
+#ifdef HAVE_LIBUSB_1_0
#include <libusb.h>
+#endif
#ifdef __cplusplus
extern "C" {
SR_SERIAL_INSTANCE,
};
+#ifdef HAVE_LIBUSB_1_0
struct sr_usb_device_instance {
uint8_t bus;
uint8_t address;
struct libusb_device_handle *devhdl;
};
+#endif
struct sr_serial_device_instance {
char *port;