X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=sigrok-cli.h;h=278eb8fcaa5ba3ea991886ccd8c3a85cf6da8e64;hp=32981e3b13949d421e630e1edc1bb84fea0f84dc;hb=6ea663a7639b87bab38c4c94624fdc9cce633ca4;hpb=2be182e6437fb082aedca653fdc106d702518db0 diff --git a/sigrok-cli.h b/sigrok-cli.h index 32981e3..278eb8f 100644 --- a/sigrok-cli.h +++ b/sigrok-cli.h @@ -21,12 +21,14 @@ #define SIGROK_CLI_SIGROK_CLI_H #include "config.h" -#include #ifdef HAVE_SRD +/* First, so we avoid a _POSIX_C_SOURCE warning. */ #include #endif +#include #define DEFAULT_OUTPUT_FORMAT "bits:width=64" +#define SAVE_CHUNK_SIZE 524288 /* main.c */ int select_probes(struct sr_dev_inst *sdi); @@ -45,23 +47,29 @@ struct sr_probe_group *select_probe_group(struct sr_dev_inst *sdi); int setup_output_format(void); void datafeed_in(const struct sr_dev_inst *sdi, const struct sr_datafeed_packet *packet, void *cb_data); +int opt_to_gvar(char *key, char *value, struct sr_config *src); int set_dev_options(struct sr_dev_inst *sdi, GHashTable *args); void run_session(void); +void save_chunk_logic(uint8_t *data, uint64_t data_len, int unitsize); /* input.c */ void load_input_file(void); /* decode.c */ -int register_pds(const char *pdstring); -int setup_pd_stack(void); -int setup_pd_annotations(void); -int setup_pd_meta(void); -int setup_pd_binary(void); +#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_annotations(char *opt_pd_annotations); +int setup_pd_meta(char *opt_pd_meta); +int setup_pd_binary(char *opt_pd_binary); void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data); void show_pd_meta(struct srd_proto_data *pdata, void *cb_data); void show_pd_binary(struct srd_proto_data *pdata, void *cb_data); +void map_pd_probes(struct sr_dev_inst *sdi); +#endif /* parsers.c */ +struct sr_probe *find_probe(GSList *probelist, const char *probename); GSList *parse_probestring(struct sr_dev_inst *sdi, const char *probestring); GHashTable *parse_generic_arg(const char *arg, gboolean sep_first); int canon_cmp(const char *str1, const char *str2);