* 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;
* options.
*/
struct hwcap_option hwcap_options[] = {
- {HWCAP_SAMPLERATE, T_UINT64, "Sample rate", "samplerate"},
- {HWCAP_CAPTURE_RATIO, T_UINT64, "Pre-trigger capture ratio", "captureratio"},
- {HWCAP_PATTERN_MODE, T_CHAR, "Pattern generator mode", "patternmode"},
+ {SR_HWCAP_SAMPLERATE, SR_T_UINT64, "Sample rate", "samplerate"},
+ {SR_HWCAP_CAPTURE_RATIO, SR_T_UINT64, "Pre-trigger capture ratio", "captureratio"},
+ {SR_HWCAP_PATTERN_MODE, SR_T_CHAR, "Pattern generator mode", "patternmode"},
{0, 0, NULL, NULL},
};
void sr_device_instance_free(struct sr_device_instance *sdi)
{
switch (sdi->instance_type) {
- case USB_INSTANCE:
+#ifdef HAVE_LIBUSB_1_0
+ case SR_USB_INSTANCE:
sr_usb_device_instance_free(sdi->usb);
break;
- case SERIAL_INSTANCE:
+#endif
+ case SR_SERIAL_INSTANCE:
sr_serial_device_instance_free(sdi->serial);
break;
default:
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)
{