* we do all the sending first, then wait for all of them to
* respond with g_poll().
*/
- g_message("probing %s...", (char *)l->data);
+ g_message("ols: probing %s...", (char *)l->data);
fd = serial_open(l->data, O_RDWR | O_NONBLOCK);
if (fd != -1) {
serial_params[devcnt] = serial_backup_params(fd);
else
sdi = sigrok_device_instance_new
(final_devcnt, ST_INACTIVE,
- "Sump", "Logic Analyzer",
+ "Openbench", "Logic Sniffer",
"v1.0");
sdi->serial = serial_device_instance_new
(device_names[i], -1);
divider = (CLOCK_RATE / samplerate) - 1;
}
- g_message("setting samplerate to %" PRIu64 " Hz (divider %u, demux %s)",
+ g_message("ols: setting samplerate to %" PRIu64 " Hz (divider %u, demux %s)",
samplerate, divider, flag_reg & FLAG_DEMUX ? "on" : "off");
if (send_longcommand(sdi->serial->fd, CMD_SET_DIVIDER, reverse32(divider)) != SIGROK_OK)
case HWCAP_LIMIT_SAMPLES:
tmp_u64 = value;
limit_samples = *tmp_u64;
+ g_message("ols: sample limit %" PRIu64, limit_samples);
ret = SIGROK_OK;
break;
case HWCAP_CAPTURE_RATIO:
return FALSE;
sample[num_bytes++] = byte;
- g_debug("received byte 0x%.2x", byte);
+ g_debug("ols: received byte 0x%.2x", byte);
if (num_bytes == num_channels) {
- g_debug("received sample 0x%.*x", num_bytes * 2, (int) *sample);
+ g_debug("ols: received sample 0x%.*x", num_bytes * 2, (int) *sample);
/* Got a full sample. */
if (flag_reg & FLAG_RLE) {
/*
}
}
memcpy(sample, tmp_sample, 4);
- g_debug("full sample 0x%.8x", (int) *sample);
+ g_debug("ols: full sample 0x%.8x", (int) *sample);
}
/* the OLS sends its sample buffer backwards.
if (trigger_mask[0]) {
delaycount = readcount * (1 - capture_ratio / 100.0);
trigger_at = (readcount - delaycount) * 4 - num_stages;
- g_message("ta %d", trigger_at);
if (send_longcommand(sdi->serial->fd, CMD_SET_TRIGGER_MASK_0,
reverse32(trigger_mask[0])) != SIGROK_OK)
if (probe_mask & (0xff << (i * 8)))
changrp_mask |= (1 << i);
}
- g_message("changrp_mask 0x%.2x", changrp_mask);
/* The flag register wants them here, and 1 means "disable channel". */
flag_reg |= ~(changrp_mask << 2) & 0x3c;
- g_message("flag_reg 0x%.2x", flag_reg & 0x3c);
-
flag_reg |= FLAG_FILTER;
data = flag_reg << 24;
if (send_longcommand(sdi->serial->fd, CMD_SET_FLAGS, data) != SIGROK_OK)
}
struct device_plugin ols_plugin_info = {
- "sump",
+ "ols",
1,
hw_init,
hw_cleanup,
if (sdi->usb->devhdl == NULL)
return;
- g_message("closing device %d on %d.%d interface %d", sdi->index,
+ g_message("saleae: closing device %d on %d.%d interface %d", sdi->index,
sdi->usb->bus, sdi->usb->address, USB_INTERFACE);
libusb_release_interface(sdi->usb->devhdl, USB_INTERFACE);
libusb_close(sdi->usb->devhdl);
timediff = cur - upd;
if (timediff < FIRMWARE_RENUM_DELAY) {
timediff = FIRMWARE_RENUM_DELAY - timediff;
- g_message("waiting %d ms for device to reset",
+ g_message("saleae: waiting %d ms for device to reset",
timediff);
g_usleep(timediff * 1000);
firmware_updated.tv_sec = 0;
divider = (uint8_t) (48 / (samplerate / 1000000.0)) - 1;
- g_message("setting samplerate to %" PRIu64 " Hz (divider %d)",
+ g_message("saleae: setting samplerate to %" PRIu64 " Hz (divider %d)",
samplerate, divider);
buf[0] = 0x01;
buf[1] = divider;
return;
}
- g_message("receive_transfer(): status %d received %d bytes",
+ g_message("saleae: receive_transfer(): status %d received %d bytes",
transfer->status, transfer->actual_length);
/* Save incoming transfer before reusing the transfer struct. */