sr_err("Firmware upload failed for "
"device %d.", devcnt);
sdi->inst_type = SR_INST_USB;
- sdi->conn = sr_usb_dev_inst_new (libusb_get_bus_number(devlist[i]),
+ sdi->conn = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]),
0xff, NULL);
}
}
ret = libusb_claim_interface(usb->devhdl, USB_INTERFACE);
if (ret != 0) {
- switch(ret) {
+ switch (ret) {
case LIBUSB_ERROR_BUSY:
sr_err("Unable to claim USB interface. Another "
"program or driver has already claimed it.");
devc->fw_updated = 0;
devc->cur_samplerate = 0;
devc->limit_samples = 0;
- devc->sample_wide = 0;
+ devc->sample_wide = FALSE;
return devc;
}
int trigger_offset, i, sample_width, cur_sample_count;
int trigger_offset_bytes;
uint8_t *cur_buf;
+ uint16_t cur_sample;
devc = transfer->user_data;
if (devc->trigger_stage >= 0) {
for (i = 0; i < cur_sample_count; i++) {
- const uint16_t cur_sample = devc->sample_wide ?
- *((const uint16_t*)cur_buf + i) :
- *((const uint8_t*)cur_buf + i);
+ cur_sample = devc->sample_wide ?
+ *((uint16_t *)cur_buf + i) :
+ *((uint8_t *)cur_buf + i);
if ((cur_sample & devc->trigger_mask[devc->trigger_stage]) ==
devc->trigger_value[devc->trigger_stage]) {