Commit e53040ca4d45ab003ddc39af28e510eaa11e807e

Kano 2013-05-09T06:47:41

Add an ftdi usb read macro without newline

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/usbutils.h b/usbutils.h
index a4f054b..7fd6cb3 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -183,6 +183,9 @@ void usb_initialise();
 #define usb_write_ep_timeout(cgpu, ep, buf, bufsiz, wrote, timeout, cmd) \
 	_usb_write(cgpu, ep, buf, bufsiz, wrote, timeout, cmd)
 
+#define usb_ftdi_read(cgpu, buf, bufsiz, read, cmd) \
+	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, true)
+
 #define usb_ftdi_read_nl(cgpu, buf, bufsiz, read, cmd) \
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, true)