X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fsysclk-lwla%2Fprotocol.h;h=f8b64ac6515719d1ac9994b1b5c9cf1bb80e0062;hb=2cfd16a31672be2ef8227dcda407e8cc5a24607f;hp=d177836e196ac95d9f8b246c070da15c3ee95963;hpb=29d587670df54e6dce281e942d1da0c0ee5a74f3;p=libsigrok.git diff --git a/hardware/sysclk-lwla/protocol.h b/hardware/sysclk-lwla/protocol.h index d177836e..f8b64ac6 100644 --- a/hardware/sysclk-lwla/protocol.h +++ b/hardware/sysclk-lwla/protocol.h @@ -44,7 +44,7 @@ /** Unit and packet size for the sigrok logic datafeed. */ #define UNIT_SIZE ((NUM_PROBES + 7) / 8) -#define PACKET_SIZE (10000 * UNIT_SIZE) /* bytes */ +#define PACKET_LENGTH 10000 /* units */ /** Size of the acquisition buffer in device memory units. */ @@ -158,7 +158,7 @@ struct acquisition_state { size_t mem_addr_next; size_t mem_addr_stop; - size_t out_offset; + size_t out_index; struct libusb_transfer *xfer_in; struct libusb_transfer *xfer_out; @@ -175,7 +175,7 @@ struct acquisition_state { uint16_t xfer_buf_in[MAX_ACQ_RECV_WORDS]; /* Payload buffer for sigrok logic packets. */ - uint8_t out_packet[PACKET_SIZE]; + uint8_t out_packet[PACKET_LENGTH * UNIT_SIZE]; }; /** Private, per-device-instance driver context.