Browse Source

Add an ftdi usb read macro without newline

Kano 13 years ago
parent
commit
e53040ca4d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      usbutils.h

+ 3 - 0
usbutils.h

@@ -183,6 +183,9 @@ void usb_initialise();
 #define usb_write_ep_timeout(cgpu, ep, buf, bufsiz, wrote, timeout, cmd) \
 #define usb_write_ep_timeout(cgpu, ep, buf, bufsiz, wrote, timeout, cmd) \
 	_usb_write(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) \
 #define usb_ftdi_read_nl(cgpu, buf, bufsiz, read, cmd) \
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, true)
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, true)