#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;