X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibsigrok-internal.h;h=debd27719a69a45da99b198a43639d9c64b7c25e;hb=c7bc82ffa1b09a228a8395049e2b691cd7bd85f8;hp=f98a35a87f2bc4fc8baf9aae3bcc161f6c30a9b2;hpb=0af636bed97c174bea46e61e961eaa1b0b162e0f;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index f98a35a8..debd2771 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 @@ -521,7 +529,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 @@ -603,6 +610,14 @@ SR_PRIV int sr_packet_copy(const struct sr_datafeed_packet *packet, struct sr_datafeed_packet **copy); SR_PRIV void sr_packet_free(struct sr_datafeed_packet *packet); +/*--- analog.c --------------------------------------------------------------*/ + +SR_PRIV int sr_analog_init(struct sr_datafeed_analog2 *analog, + struct sr_analog_encoding *encoding, + struct sr_analog_meaning *meaning, + struct sr_analog_spec *spec, + int digits); + /*--- std.c -----------------------------------------------------------------*/ typedef int (*dev_close_callback)(struct sr_dev_inst *sdi); @@ -639,13 +654,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 -----------------------------------------------------*/