]> sigrok.org Git - sigrok-cli.git/blobdiff - sigrok-cli.c
cli: Fix -V/-h output a bit.
[sigrok-cli.git] / sigrok-cli.c
index a2db18f9b1703eaffb52fafc7410b8839d5eb47f..01002f7bdbea7c46c3cc4a9e943bf3aa6cea418a 100644 (file)
@@ -65,18 +65,18 @@ static gchar *opt_continuous = NULL;
 
 static GOptionEntry optargs[] = {
        {"version", 'V', 0, G_OPTION_ARG_NONE, &opt_version, "Show version and support list", NULL},
-       {"loglevel", 'l', 0, G_OPTION_ARG_INT, &opt_loglevel, "Select libsigrok loglevel", NULL},
-       {"list-devices", 'D', 0, G_OPTION_ARG_NONE, &opt_list_devs, "List devices", NULL},
+       {"loglevel", 'l', 0, G_OPTION_ARG_INT, &opt_loglevel, "Select libsigrok/libsigrokdecode loglevel", NULL},
+       {"list-devices", 'D', 0, G_OPTION_ARG_NONE, &opt_list_devs, "Scan for devices", NULL},
+       {"device", 'd', 0, G_OPTION_ARG_STRING, &opt_dev, "Use specified device", NULL},
        {"input-file", 'i', 0, G_OPTION_ARG_FILENAME, &opt_input_file, "Load input from file", NULL},
+       {"input-format", 'I', 0, G_OPTION_ARG_STRING, &opt_input_format, "Input format", NULL},
        {"output-file", 'o', 0, G_OPTION_ARG_FILENAME, &opt_output_file, "Save output to file", NULL},
-       {"device", 'd', 0, G_OPTION_ARG_STRING, &opt_dev, "Use device ID", NULL},
+       {"output-format", 'O', 0, G_OPTION_ARG_STRING, &opt_output_format, "Output format", NULL},
        {"probes", 'p', 0, G_OPTION_ARG_STRING, &opt_probes, "Probes to use", NULL},
        {"triggers", 't', 0, G_OPTION_ARG_STRING, &opt_triggers, "Trigger configuration", NULL},
        {"wait-trigger", 'w', 0, G_OPTION_ARG_NONE, &opt_wait_trigger, "Wait for trigger", NULL},
-       {"protocol-decoders", 'a', 0, G_OPTION_ARG_STRING, &opt_pds, "Protocol decoder sequence", NULL},
+       {"protocol-decoders", 'a', 0, G_OPTION_ARG_STRING, &opt_pds, "Protocol decoders to run", NULL},
        {"protocol-decoder-stack", 's', 0, G_OPTION_ARG_STRING, &opt_pd_stack, "Protocol decoder stack", NULL},
-       {"input-format", 'I', 0, G_OPTION_ARG_STRING, &opt_input_format, "Input format", NULL},
-       {"output-format", 'O', 0, G_OPTION_ARG_STRING, &opt_output_format, "Output format", NULL},
        {"time", 0, 0, G_OPTION_ARG_STRING, &opt_time, "How long to sample (ms)", NULL},
        {"samples", 0, 0, G_OPTION_ARG_STRING, &opt_samples, "Number of samples to acquire", NULL},
        {"continuous", 0, 0, G_OPTION_ARG_NONE, &opt_continuous, "Sample continuously", NULL},
@@ -212,9 +212,9 @@ static void show_dev_detail(void)
 
                if (hwo->hwcap == SR_HWCAP_PATTERN_MODE) {
                        printf("    %s", hwo->shortname);
-                       if (sr_dev_info_get(dev, SR_DI_PATTERNMODES,
+                       if (sr_dev_info_get(dev, SR_DI_PATTERNS,
                                        (const void **)&stropts) == SR_OK) {
-                               printf(" - supported modes:\n");
+                               printf(" - supported patterns:\n");
                                for (i = 0; stropts[i]; i++)
                                        printf("      %s\n", stropts[i]);
                        } else {
@@ -438,7 +438,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet)
                goto cleanup;
 
        if (opt_pds) {
-               if (srd_session_feed(received_samples, (uint8_t*)filter_out,
+               if (srd_session_send(received_samples, (uint8_t*)filter_out,
                                filter_out_len) != SRD_OK)
                        sr_session_halt();
        } else {