printf("sigrok-cli %s\n\n", VERSION);
printf("Supported hardware drivers:\n");
printf("sigrok-cli %s\n\n", VERSION);
printf("Supported hardware drivers:\n");
for (p = plugins; p; p = p->next) {
plugin = p->data;
printf(" %-20s %s\n", plugin->name, plugin->longname);
for (p = plugins; p; p = p->next) {
plugin = p->data;
printf(" %-20s %s\n", plugin->name, plugin->longname);
if (sdi->vendor && sdi->vendor[0])
printf("%s ", sdi->vendor);
if (sdi->vendor && sdi->vendor[0])
printf("%s ", sdi->vendor);
- if (sr_device_get_info(device, SR_DI_TRIGGER_TYPES,
- (const void **) &charopts) == SR_OK) {
+ if (sr_dev_get_info(device, SR_DI_TRIGGER_TYPES,
+ (const void **)&charopts) == SR_OK) {
printf("Supported triggers: ");
while (*charopts) {
printf("%c ", *charopts);
printf("Supported triggers: ");
while (*charopts) {
printf("%c ", *charopts);
if (hwo->capability == SR_HWCAP_PATTERN_MODE) {
printf(" %s", hwo->shortname);
if (hwo->capability == SR_HWCAP_PATTERN_MODE) {
printf(" %s", hwo->shortname);
- if (sr_device_get_info(device, SR_DI_PATTERNMODES,
- (const void **) &stropts) == SR_OK) {
+ if (sr_dev_get_info(device, SR_DI_PATTERNMODES,
+ (const void **)&stropts) == SR_OK) {
printf(" - supported modes:\n");
for (i = 0; stropts[i]; i++)
printf(" %s\n", stropts[i]);
printf(" - supported modes:\n");
for (i = 0; stropts[i]; i++)
printf(" %s\n", stropts[i]);
} else if (hwo->capability == SR_HWCAP_SAMPLERATE) {
printf(" %s", hwo->shortname);
/* Supported samplerates */
} else if (hwo->capability == SR_HWCAP_SAMPLERATE) {
printf(" %s", hwo->shortname);
/* Supported samplerates */
- if (sr_device_get_info(device, SR_DI_SAMPLERATES,
- (const void **) &samplerates) != SR_OK) {
+ if (sr_dev_get_info(device, SR_DI_SAMPLERATES,
+ (const void **)&samplerates) != SR_OK) {
if (device->plugin->set_configuration(device->plugin_index,
SR_HWCAP_LIMIT_MSEC, &time_msec) != SR_OK) {
printf("Failed to configure time limit.\n");
if (device->plugin->set_configuration(device->plugin_index,
SR_HWCAP_LIMIT_MSEC, &time_msec) != SR_OK) {
printf("Failed to configure time limit.\n");
- sr_device_get_info(device, SR_DI_CUR_SAMPLERATE,
- (const void **) &samplerate);
- limit_samples = (*samplerate) * time_msec / (uint64_t) 1000;
+ sr_dev_get_info(device, SR_DI_CUR_SAMPLERATE,
+ (const void **)&samplerate);
+ limit_samples = (*samplerate) * time_msec / (uint64_t)1000;