#include <glib.h>
#include <glib/gstdio.h>
#include "protocol.h"
+#include "dslogic.h"
#pragma pack(push, 1)
libusb_device_handle *devhdl = usb->devhdl;
int cmd, ret;
- cmd = devc->dslogic ? CMD_DSLOGIC_GET_REVID_VERSION : CMD_GET_REVID_VERSION;
+ cmd = devc->dslogic ? DS_CMD_GET_REVID_VERSION : CMD_GET_REVID_VERSION;
ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
LIBUSB_ENDPOINT_IN, cmd, 0x0000, 0x0000, revid, 1, 100);
delay = SR_MHZ(30) / samplerate - 1;
}
- sr_info("GPIF delay = %d, clocksource = %sMHz.", delay,
+ sr_dbg("GPIF delay = %d, clocksource = %sMHz.", delay,
(cmd.flags & CMD_START_FLAGS_CLK_48MHZ) ? "48" : "30");
if (delay <= 0 || delay > MAX_SAMPLE_DELAY) {
* Check the USB configuration to determine if this is an fx2lafw device.
*
* @return TRUE if the device's configuration profile matches fx2lafw
- * configuration, FALSE otherwise.
+ * configuration, FALSE otherwise.
*/
SR_PRIV gboolean match_manuf_prod(libusb_device *dev, const char *manufacturer,
const char *product)
if (libusb_get_string_descriptor_ascii(hdl,
des.iManufacturer, strdesc, sizeof(strdesc)) < 0)
break;
- if (strncmp((const char *)strdesc, manufacturer, 6))
+ if (strcmp((const char *)strdesc, manufacturer))
break;
if (libusb_get_string_descriptor_ascii(hdl,
des.iProduct, strdesc, sizeof(strdesc)) < 0)
break;
- if (strncmp((const char *)strdesc, product, 7))
+ if (strcmp((const char *)strdesc, product))
break;
ret = TRUE;
return;
}
- sr_info("receive_transfer(): status %d received %d bytes.",
+ sr_dbg("receive_transfer(): status %d received %d bytes.",
transfer->status, transfer->actual_length);
/* Save incoming transfer before reusing the transfer struct. */