if (sdi->vendor && sdi->vendor[0])
printf("%s ", sdi->vendor);
if (sdi->vendor && sdi->vendor[0])
printf("%s ", sdi->vendor);
print_device_line(device);
if (sr_device_get_info(device, SR_DI_TRIGGER_TYPES,
print_device_line(device);
if (sr_device_get_info(device, SR_DI_TRIGGER_TYPES,
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 (sr_device_get_info(device, SR_DI_PATTERNMODES,
if (hwo->capability == SR_HWCAP_PATTERN_MODE) {
printf(" %s", hwo->shortname);
if (sr_device_get_info(device, SR_DI_PATTERNMODES,
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]);
printf(" %s", hwo->shortname);
/* Supported samplerates */
if (sr_device_get_info(device, SR_DI_SAMPLERATES,
printf(" %s", hwo->shortname);
/* Supported samplerates */
if (sr_device_get_info(device, SR_DI_SAMPLERATES,
/* step */
if (!(s = sr_samplerate_string(samplerates->step)))
continue;
printf(" in steps of %s)\n", s);
/* step */
if (!(s = sr_samplerate_string(samplerates->step)))
continue;
printf(" in steps of %s)\n", s);
if (output_len) {
if (outfile)
fwrite(output_buf, 1, output_len, outfile);
if (output_len) {
if (outfile)
fwrite(output_buf, 1, output_len, outfile);
sample_size = logic->unitsize;
g_message("cli: received SR_DF_LOGIC, %"PRIu64" bytes", logic->length);
break;
sample_size = logic->unitsize;
g_message("cli: received SR_DF_LOGIC, %"PRIu64" bytes", logic->length);
break;
o->format->data(o, filter_out, filter_out_len, &output_buf, &output_len);
if (output_len) {
fwrite(output_buf, 1, output_len, outfile);
o->format->data(o, filter_out, filter_out_len, &output_buf, &output_len);
if (output_len) {
fwrite(output_buf, 1, output_len, outfile);
char **pdtokens, **pdtok, *pd_name;
/* Avoid compiler warnings. */
char **pdtokens, **pdtok, *pd_name;
/* Avoid compiler warnings. */
pd_name = g_strdup(g_hash_table_lookup(pd_opthash, "sigrok_key"));
g_hash_table_remove(pd_opthash, "sigrok_key");
pd_name = g_strdup(g_hash_table_lookup(pd_opthash, "sigrok_key"));
g_hash_table_remove(pd_opthash, "sigrok_key");
/* Any keys left in the options hash are probes, where the key
* is the probe name as specified in the decoder class, and the
* value is the probe number i.e. the order in which the PD's
* incoming samples are arranged. */
/* Any keys left in the options hash are probes, where the key
* is the probe name as specified in the decoder class, and the
* value is the probe number i.e. the order in which the PD's
* incoming samples are arranged. */
const uint64_t *samplerate;
sr_device_get_info(device, SR_DI_CUR_SAMPLERATE,
const uint64_t *samplerate;
sr_device_get_info(device, SR_DI_CUR_SAMPLERATE,
- if (sr_set_loglevel(opt_loglevel) != SR_OK) {
- fprintf(stderr, "cli: %s: sr_set_loglevel(%d) failed\n",
+ if (sr_log_loglevel_set(opt_loglevel) != SR_OK) {
+ fprintf(stderr, "cli: %s: sr_log_loglevel_set(%d) failed\n",
- if (srd_set_loglevel(opt_loglevel) != SRD_OK) {
- fprintf(stderr, "cli: %s: srd_set_loglevel(%d) failed\n",
+ if (srd_log_loglevel_set(opt_loglevel) != SRD_OK) {
+ fprintf(stderr, "cli: %s: srd_log_loglevel_set(%d) failed\n",
printf("Cannot stack protocol decoder '%s': instance not found.\n", pds[0]);
return 1;
}
for (i = 1; pds[i]; i++) {
printf("Cannot stack protocol decoder '%s': instance not found.\n", pds[0]);
return 1;
}
for (i = 1; pds[i]; i++) {
return ret;
/* Don't show annotation from this PD. Only the last PD in
* the stack will be left on the annotation list.
*/
return ret;
/* Don't show annotation from this PD. Only the last PD in
* the stack will be left on the annotation list.
*/