From: Timo Rothenpieler Date: Wed, 11 Oct 2017 13:08:50 +0000 (+0200) Subject: hantek-6xxx: use lower MAX_PACKET_SIZE on Windows X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=095eba19d6ddda139f01eeb36e81f06bd2d91748;p=libsigrok.git hantek-6xxx: use lower MAX_PACKET_SIZE on Windows WinUSB seems to have a maximum size of 2M, reads of a larger size fail. This fixes bug #1048. --- diff --git a/src/hardware/hantek-6xxx/protocol.h b/src/hardware/hantek-6xxx/protocol.h index 73d8f868..a106fb4b 100644 --- a/src/hardware/hantek-6xxx/protocol.h +++ b/src/hardware/hantek-6xxx/protocol.h @@ -60,7 +60,11 @@ #define FLUSH_PACKET_SIZE 1024 #define MIN_PACKET_SIZE 512 +#ifdef _WIN32 +#define MAX_PACKET_SIZE (2 * 1024 * 1024) +#else #define MAX_PACKET_SIZE (12 * 1024 * 1024) +#endif #define HANTEK_EP_IN 0x86 #define USB_INTERFACE 0