X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibsigrok-internal.h;h=71f65616de52baf7b4705016d0a2aa7d990dea89;hb=479b7e469ad5ee24e621c1848debe9e325e854e2;hp=bdbcb09059019bf80d48e10b7d6d2d346ffd038f;hpb=41caa31909882a34b88c8b8a844d555816b78453;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index bdbcb090..71f65616 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -159,6 +159,7 @@ /* Portability fixes for FreeBSD. */ #ifdef __FreeBSD__ #define LIBUSB_CLASS_APPLICATION 0xfe +#define libusb_has_capability(x) 0 #define libusb_handle_events_timeout_completed(ctx, tv, c) \ libusb_handle_events_timeout(ctx, tv) #endif @@ -237,6 +238,13 @@ struct sr_input_module { */ const char *desc; + /** + * A NULL terminated array of strings containing a list of file name + * extensions typical for the input file format, or NULL if there is + * no typical extension for this file format. + */ + const char *const *exts; + /** * Zero-terminated list of metadata items the module needs to be able * to identify an input stream. Can be all-zero, if the module cannot @@ -363,6 +371,13 @@ struct sr_output_module { */ char *desc; + /** + * A NULL terminated array of strings containing a list of file name + * extensions typical for the input file format, or NULL if there is + * no typical extension for this file format. + */ + const char *const *exts; + /** * Returns a NULL-terminated list of options this module can take. * Can be NULL, if the module has no options. @@ -521,7 +536,6 @@ struct sr_dev_inst { }; /* Generic device instances */ -SR_PRIV struct sr_dev_inst *sr_dev_inst_new(void); SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi); #ifdef HAVE_LIBUSB_1_0 @@ -647,13 +661,18 @@ struct soft_trigger_logic { int unitsize; int cur_stage; uint8_t *prev_sample; + uint8_t *pre_trigger_buffer; + uint8_t *pre_trigger_head; + int pre_trigger_size; + int pre_trigger_fill; }; SR_PRIV struct soft_trigger_logic *soft_trigger_logic_new( - const struct sr_dev_inst *sdi, struct sr_trigger *trigger); + const struct sr_dev_inst *sdi, struct sr_trigger *trigger, + int pre_trigger_samples); SR_PRIV void soft_trigger_logic_free(struct soft_trigger_logic *st); SR_PRIV int soft_trigger_logic_check(struct soft_trigger_logic *st, uint8_t *buf, - int len); + int len, int *pre_trigger_samples); /*--- hardware/serial.c -----------------------------------------------------*/