Commit 9246bbc6036b732c2a9737ec80d4e1c88cd9058a

Con Kolivas 2013-06-23T10:11:22

Add a usb_read_nl_timeout macro.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/usbutils.h b/usbutils.h
index fc88fd9..1191d15 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -315,6 +315,9 @@ void *usb_resource_thread(void *userdata);
 #define usb_read_nl(cgpu, buf, bufsiz, read, cmd) \
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, false)
 
+#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeotu, cmd) \
+	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "\n", cmd, false)
+
 #define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "OK\n", cmd, false)