]> sigrok.org Git - libsigrok.git/blobdiff - hardware/saleae-logic16/protocol.h
build: Portability fixes.
[libsigrok.git] / hardware / saleae-logic16 / protocol.h
index cd8380e3d1d7d399a50be0b87fcd42aca8bf2280..8a1ded823900e7ae41c194f355d1a73b5f07fb15 100644 (file)
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 
-/* Message logging helpers with subsystem-specific prefix string. */
-#define LOG_PREFIX "saleae-logic16: "
-#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
-#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
-#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
-#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
-#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
-#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
+#define LOG_PREFIX "saleae-logic16"
 
 enum voltage_range {
        VOLTAGE_RANGE_UNKNOWN,
@@ -70,19 +63,22 @@ struct dev_context {
        /* EEPROM data from address 8. */
        uint8_t eeprom_data[8];
 
-       int64_t num_samples;
+       int64_t sent_samples;
        int submitted_transfers;
        int empty_transfer_count;
-       int num_channels, cur_channel;
+       int num_channels;
+       int cur_channel;
        uint16_t channel_masks[16];
        uint16_t channel_data[16];
        uint8_t *convbuffer;
        size_t convbuffer_size;
+       struct soft_trigger_logic *stl;
+       gboolean trigger_fired;
 
        void *cb_data;
        unsigned int num_transfers;
        struct libusb_transfer **transfers;
-       int *usbfd;
+       struct sr_context *ctx;
 };
 
 SR_PRIV int logic16_setup_acquisition(const struct sr_dev_inst *sdi,