int idx;
struct dev_context *devc = sdi->priv;
struct h4032l_cmd_pkt *cmd_pkt = &devc->cmd_pkt;
- uint64_t sample_rate, number_samples;
+ uint64_t sample_rate, num_samples;
double low, high;
switch (key) {
devc->capture_ratio = g_variant_get_uint64(data);
break;
case SR_CONF_LIMIT_SAMPLES:
- number_samples = g_variant_get_uint64(data);
- number_samples += 511;
- number_samples &= 0xfffffe00;
- if (number_samples < H4043L_NUM_SAMPLES_MIN ||
- number_samples > H4032L_NUM_SAMPLES_MAX) {
+ num_samples = g_variant_get_uint64(data);
+ num_samples += 511;
+ num_samples &= 0xfffffe00;
+ if (num_samples < H4043L_NUM_SAMPLES_MIN ||
+ num_samples > H4032L_NUM_SAMPLES_MAX) {
sr_err("Invalid sample range 2k...64M: %"
- PRIu64 ".", number_samples);
+ PRIu64 ".", num_samples);
return SR_ERR;
}
- cmd_pkt->sample_size = number_samples;
+ cmd_pkt->sample_size = num_samples;
break;
case SR_CONF_VOLTAGE_THRESHOLD:
if (!cg)
struct dev_context *const devc = sdi->priv;
uint32_t max_samples = transfer->actual_length / sizeof(uint32_t);
uint32_t *buffer;
- uint32_t number_samples;
+ uint32_t num_samples;
/*
* If acquisition has already ended, just free any queued up
buffer = (uint32_t *)transfer->buffer;
- number_samples = MIN(devc->remaining_samples, max_samples);
- devc->remaining_samples -= number_samples;
- send_data(sdi, buffer, number_samples);
+ num_samples = MIN(devc->remaining_samples, max_samples);
+ devc->remaining_samples -= num_samples;
+ send_data(sdi, buffer, num_samples);
sr_dbg("Remaining: %d %08X %08X.", devc->remaining_samples,
buffer[0], buffer[1]);
/* Close data receiving. */
if (devc->remaining_samples == 0) {
- if (buffer[number_samples] != H4032L_END_PACKET_MAGIC)
+ if (buffer[num_samples] != H4032L_END_PACKET_MAGIC)
sr_err("Mismatch magic number of end poll.");
abort_acquisition(devc);
uint32_t max_samples = transfer->actual_length / sizeof(uint32_t);
uint32_t *buffer;
struct h4032l_status_packet *status;
- uint32_t number_samples;
+ uint32_t num_samples;
int ret;
/*
buffer++;
/* Fallthrough. */
case H4032L_STATUS_TRANSFER:
- number_samples = MIN(devc->remaining_samples, max_samples);
- devc->remaining_samples -= number_samples;
- send_data(sdi, buffer, number_samples);
+ num_samples = MIN(devc->remaining_samples, max_samples);
+ devc->remaining_samples -= num_samples;
+ send_data(sdi, buffer, num_samples);
sr_dbg("Remaining: %d %08X %08X.", devc->remaining_samples,
buffer[0], buffer[1]);
break;