Commit 2b998936fe240bc1904629d359ddf76ae1ac31fe

Con Kolivas 2013-10-25T04:13:32

Add a usb_read_ii_timeout_cancellable wrapper

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/usbutils.h b/usbutils.h
index 2253337..52441be 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -440,6 +440,9 @@ void *usb_resource_thread(void *userdata);
 #define usb_read_ii_timeout(cgpu, intinfo, buf, bufsiz, read, timeout, cmd) \
 	_usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, false, false)
 
+#define usb_read_ii_timeout_cancellable(cgpu, intinfo, buf, bufsiz, read, timeout, cmd) \
+	_usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, false, true)
+
 #define usb_read_ep_timeout(cgpu, ep, buf, bufsiz, read, timeout, cmd) \
 	_usb_read(cgpu, DEFAULT_INTINFO, ep, buf, bufsiz, read, timeout, NULL, cmd, false, false)