]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/saleae-logic-pro/protocol.h
Check usb_get_port_path() return value
[libsigrok.git] / src / hardware / saleae-logic-pro / protocol.h
index 7fb099ca2a2a5fba1e4ed229043ac8879491c888..9844454381463ae3bfe91b9b4e10e0286a9f5b28 100644 (file)
 #define LOG_PREFIX "saleae-logic-pro"
 
 /* 16 channels * 32 samples */
-#define CONV_BATCH_SIZE (2*32)
-/* one packet + one partial conversion:
- * worst case is only one active channel converted to 2 bytes per sample, with
- * 8*16384 samples per packet
+#define CONV_BATCH_SIZE (2 * 32)
+
+/*
+ * One packet + one partial conversion: Worst case is only one active
+ * channel converted to 2 bytes per sample, with 8 * 16384 samples per packet.
  */
-#define CONV_BUFFER_SIZE (2*8*16384 + CONV_BATCH_SIZE)
+#define CONV_BUFFER_SIZE (2 * 8 * 16384 + CONV_BATCH_SIZE)
 
-/** Private, per-device-instance driver context. */
 struct dev_context {
-       /* Acquisition settings */
        unsigned int dig_channel_cnt;
        uint16_t dig_channel_mask;
        uint16_t dig_channel_masks[16];
        uint64_t dig_samplerate;
 
-       /* Operational state */
        uint32_t lfsr;
 
-       /* Temporary state across callbacks */
        unsigned int num_transfers;
        unsigned int submitted_transfers;
        struct libusb_transfer **transfers;
 
-       /* Conversion buffer */
        uint8_t *conv_buffer;
        unsigned int conv_size;
        unsigned int batch_index;