1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-14 16:58:05 +00:00

Add a usb_read_ok_timeout wrapper to cope with slow init'ing devices.

This commit is contained in:
Con Kolivas 2013-06-09 17:15:48 +10:00
parent 24398bde03
commit 7fc9666429

View File

@ -287,6 +287,9 @@ void *usb_resource_thread(void *userdata);
#define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \ #define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \
_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "OK\n", cmd, false) _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "OK\n", cmd, false)
#define usb_read_ok_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "OK\n", cmd, false)
#define usb_read_ep(cgpu, ep, buf, bufsiz, read, cmd) \ #define usb_read_ep(cgpu, ep, buf, bufsiz, read, cmd) \
_usb_read(cgpu, ep, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false) _usb_read(cgpu, ep, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false)