trigger_value[stage] |= probe_bit;
stage++;
if(stage > NUM_TRIGGER_STAGES)
- return SIGROK_NOK;
+ return SIGROK_ERR;
}
}
}
if( !(sdi = zp_open_device(device_index)) ) {
g_warning("unable to open device");
- return SIGROK_NOK;
+ return SIGROK_ERR;
}
err = libusb_claim_interface(sdi->usb->devhdl, USB_INTERFACE);
if(err != 0) {
g_warning("Unable to claim interface: %d", err);
- return SIGROK_NOK;
+ return SIGROK_ERR;
}
analyzer_reset(sdi->usb->devhdl);
analyzer_initialize(sdi->usb->devhdl);
if(cur_samplerate == 0) {
/* sample rate hasn't been set; default to the slowest it has */
- if(hw_set_configuration(device_index, HWCAP_SAMPLERATE, &samplerates.low) == SIGROK_NOK)
- return SIGROK_NOK;
+ if(hw_set_configuration(device_index, HWCAP_SAMPLERATE, &samplerates.low) == SIGROK_ERR)
+ return SIGROK_ERR;
}
return SIGROK_OK;
uint64_t *tmp_u64;
if( !(sdi = get_sigrok_device_instance(device_instances, device_index)) )
- return SIGROK_NOK;
+ return SIGROK_ERR;
switch (capability) {
case HWCAP_SAMPLERATE:
return SIGROK_OK;
default:
- return SIGROK_NOK;
+ return SIGROK_ERR;
}
}
unsigned char *buf;
if( !(sdi = get_sigrok_device_instance(device_instances, device_index)))
- return SIGROK_NOK;
+ return SIGROK_ERR;
analyzer_start(sdi->usb->devhdl);
g_message("Waiting for data");
buf = g_malloc(PACKET_SIZE);
if (!buf)
- return SIGROK_NOK;
+ return SIGROK_ERR;
analyzer_read_start(sdi->usb->devhdl);
/* send the incoming transfer to the session bus */
for(packet_num = 0; packet_num < (memory_size * 4 / PACKET_SIZE); packet_num++) {