From 1a0202812a196a3e9efb61d2e73f37f7d44d8baa Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 27 Sep 2013 09:41:55 +1000 Subject: [PATCH] Add more read_ii variants to usbutils. --- usbutils.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usbutils.h b/usbutils.h index c4aaed81..d8bb6489 100644 --- a/usbutils.h +++ b/usbutils.h @@ -386,12 +386,18 @@ void *usb_resource_thread(void *userdata); #define usb_read(cgpu, buf, bufsiz, read, cmd) \ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false) +#define usb_read_ii(cgpu, intinfo, buf, bufsiz, read, cmd) \ + _usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false) + #define usb_read_once(cgpu, buf, bufsiz, read, cmd) \ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, true) #define usb_read_once_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, true) +#define usb_read_ii_once_timeout(cgpu, intinfo, buf, bufsiz, read, timeout, cmd) \ + _usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, true) + #define usb_read_nl(cgpu, buf, bufsiz, read, cmd) \ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, false)