]> sigrok.org Git - libsigrok.git/commitdiff
hantek-6xxx: use lower MAX_PACKET_SIZE on Windows
authorTimo Rothenpieler <redacted>
Wed, 11 Oct 2017 13:08:50 +0000 (15:08 +0200)
committerUwe Hermann <redacted>
Thu, 19 Oct 2017 13:01:06 +0000 (15:01 +0200)
WinUSB seems to have a maximum size of 2M, reads of a larger size fail.

This fixes bug #1048.

src/hardware/hantek-6xxx/protocol.h

index 73d8f868da27430072a30b674ea96440ab27da22..a106fb4b5d6999d1dfd161646901933504a28bdb 100644 (file)
 #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