X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsaleae-logic-pro%2Fprotocol.h;h=9844454381463ae3bfe91b9b4e10e0286a9f5b28;hb=8ff25aa9b285edca280b2abc95382a8a5ba785d6;hp=7fb099ca2a2a5fba1e4ed229043ac8879491c888;hpb=b6189f7c8af7d8eed6bdcf75fa05c95d8120c9b8;p=libsigrok.git diff --git a/src/hardware/saleae-logic-pro/protocol.h b/src/hardware/saleae-logic-pro/protocol.h index 7fb099ca..98444543 100644 --- a/src/hardware/saleae-logic-pro/protocol.h +++ b/src/hardware/saleae-logic-pro/protocol.h @@ -28,30 +28,26 @@ #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;