}
}
-int setup_pd_stack(char *opt_pds, char *opt_pd_stack, char *opt_pd_annotations)
+int setup_pd_stack(char *opt_pds, char *opt_pd_annotations)
{
struct srd_decoder_inst *di_from, *di_to;
int ret, i;
/* Set up the protocol decoder stack. */
pds = g_strsplit(opt_pds, ",", 0);
if (g_strv_length(pds) > 1) {
- if (opt_pd_stack) {
- /* A stack setup was specified, use that. */
- g_strfreev(pds);
- pds = g_strsplit(opt_pd_stack, ",", 0);
- if (g_strv_length(pds) < 2) {
- g_strfreev(pds);
- g_critical("Specify at least two protocol decoders to stack.");
- return 1;
- }
- }
-
/* First PD goes at the bottom of the stack. */
ids = g_strsplit(pds[0], ":", 0);
if (!(di_from = srd_inst_find_by_id(srd_sess, ids[0]))) {
protocol using channel 1 as MISO signal for SPI, channel 5 as MOSI, channel 3
as CLK, and channel 0 as CS# signal.
.TP
-.BR "\-S, \-\-protocol\-decoder\-stack " <stack>
-This option allows the user to specify a protocol decoder stack, i.e.
-the way in which one protocol decoder's output gets piped into another
-protocol decoder. If not specified, the stack will be set up in the same
-order in which the protocol decoders were given with the
-.B \-\-protocol-decoders
-option.
-.sp
-The decoders are specified by their ID, as shown in the
-.B \-\-version
-output. In addition to the
-.B \-S
-option, all protocol decoders that are used in a stack, must also be specified
-(together with their options, if any) using the
-.B \-P
-parameter.
-.sp
-Example:
-.sp
- $
-.B "sigrok\-cli \-i <file.sr> \-P i2c:sda=4:scl=7,rtc8564"
-.br
-.B " \-S i2c,rtc8564"
-.sp
-In this example, the
-.B \-S
-option specifies that the output of the
-.BR i2c " decoder"
-is piped into the
-.BR rtc8564 " decoder,"
-i.e., the
-.BR rtc8564 " decoder"
-is stacked on top of the
-.BR i2c " decoder."
-.sp
-The respective protocol decoder options and channel name/number assignments
-must be given using the
-.B \-P
-option (you cannot specify them in the
-.B \-S
-option).
-.TP
.BR "\-A, \-\-protocol\-decoder\-annotations " <annotations>
By default, only the stack's topmost protocol decoder's annotation output is
shown. With this option another decoder's annotation can be selected for
}
if (register_pds(opt_pds, opt_pd_annotations) != 0)
goto done;
- if (setup_pd_stack(opt_pds, opt_pd_stack, opt_pd_annotations) != 0)
+ if (setup_pd_stack(opt_pds, opt_pd_annotations) != 0)
goto done;
/* Only one output type is ever shown. */
gchar *opt_triggers = NULL;
gchar *opt_pds = NULL;
#ifdef HAVE_SRD
-gchar *opt_pd_stack = NULL;
gchar *opt_pd_annotations = NULL;
gchar *opt_pd_meta = NULL;
gchar *opt_pd_binary = NULL;
CHECK_ONCE(opt_triggers)
#ifdef HAVE_SRD
CHECK_ONCE(opt_pds)
-CHECK_ONCE(opt_pd_stack)
CHECK_ONCE(opt_pd_annotations)
CHECK_ONCE(opt_pd_meta)
CHECK_ONCE(opt_pd_binary)
#ifdef HAVE_SRD
{"protocol-decoders", 'P', 0, G_OPTION_ARG_CALLBACK, &check_opt_pds,
"Protocol decoders to run", NULL},
- {"protocol-decoder-stack", 'S', 0, G_OPTION_ARG_CALLBACK, &check_opt_pd_stack,
- "Protocol decoder stack", NULL},
{"protocol-decoder-annotations", 'A', 0, G_OPTION_ARG_CALLBACK, &check_opt_pd_annotations,
"Protocol decoder annotation(s) to show", NULL},
{"protocol-decoder-meta", 'M', 0, G_OPTION_ARG_CALLBACK, &check_opt_pd_meta,
/* decode.c */
#ifdef HAVE_SRD
int register_pds(const char *opt_pds, char *opt_pd_annotations);
-int setup_pd_stack(char *opt_pds, char *opt_pd_stack, char *opt_pd_annotations);
+int setup_pd_stack(char *opt_pds, char *opt_pd_annotations);
int setup_pd_annotations(char *opt_pd_annotations);
int setup_pd_meta(char *opt_pd_meta);
int setup_pd_binary(char *opt_pd_binary);
extern gchar *opt_triggers;
extern gchar *opt_pds;
#ifdef HAVE_SRD
-extern gchar *opt_pd_stack;
extern gchar *opt_pd_annotations;
extern gchar *opt_pd_meta;
extern gchar *opt_pd_binary;