pos += len;
}
sr_resource_close(drvc->sr_ctx, &bitstream);
- if (ret != 0)
+ if (ret != SR_OK)
return ret;
sr_info("FPGA bitstream upload (%" PRIu64 " bytes) done.",
bitstream.size);
libusb_device *dev, uint16_t product_id)
{
char fw_file[1024];
- snprintf(fw_file, sizeof(fw_file) - 1, UC_FIRMWARE, product_id);
+ snprintf(fw_file, sizeof(fw_file), UC_FIRMWARE, product_id);
return ezusb_upload_firmware(sr_ctx, dev, USB_CONFIGURATION, fw_file);
}
/* User specified parameters. */
struct pwm_setting pwm_setting[LA2016_NUM_PWMCH_MAX];
- unsigned int threshold_voltage_idx;
+ size_t threshold_voltage_idx;
float threshold_voltage;
uint64_t max_samplerate;
uint64_t cur_samplerate;