X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-test.git;a=blobdiff_plain;f=decoder%2Fruntc.c;h=074882629350a5e28cb3f6c90ab1bb8f9ea34cdb;hp=49e6a61009d8eaa9eb34ef128921973bcbac245d;hb=HEAD;hpb=cb5b23ce1221332d20a4d0202c4e845935b8d440
diff --git a/decoder/runtc.c b/decoder/runtc.c
index 49e6a61..0748826 100644
--- a/decoder/runtc.c
+++ b/decoder/runtc.c
@@ -17,6 +17,8 @@
* along with this program. If not, see .
*/
+#include
+
#include
#include
#include
@@ -37,6 +39,8 @@
#include
#endif
+#define CHUNK_SIZE (4 * 1024 * 1024)
+
static int debug = FALSE;
static int statistics = FALSE;
static char *coverage_report;
@@ -52,16 +56,30 @@ struct option {
GVariant *value;
};
+struct initial_pin_info {
+ char *name;
+ int value;
+};
+
struct pd {
const char *name;
GSList *channels;
GSList *options;
+ GSList *initial_pins;
+};
+
+struct input {
+ const char *filename;
+ const char *format;
+ GSList *opt_list;
+ GHashTable *opt_hash;
};
struct output {
const char *pd;
+ const char *pd_id;
int type;
- const char *class;
+ const char *class_;
int class_idx;
const char *outfile;
int outfd;
@@ -136,15 +154,18 @@ static void usage(const char *msg)
if (msg)
fprintf(stderr, "%s\n", msg);
- printf("Usage: runtc [-dPpoiOf]\n");
- printf(" -d Debug\n");
- printf(" -P \n");
- printf(" -p (optional)\n");
- printf(" -o (optional)\n");
+ printf("Usage: runtc [-dPpoiOfcS]\n");
+ printf(" -d (enables debug output)\n");
+ printf(" -P \n");
+ printf(" -p (optional)\n");
+ printf(" -o (optional)\n");
+ printf(" -N (optional)\n");
printf(" -i \n");
+ printf(" -I (optional)\n");
printf(" -O \n");
printf(" -f