mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Merge branch 'master' of github.com:ckolivas/cgminer
This commit is contained in:
commit
72ee48c113
@ -39,6 +39,10 @@ static int BFopen(const char *devpath)
|
|||||||
HANDLE hSerial = CreateFile(devpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
HANDLE hSerial = CreateFile(devpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
if (unlikely(hSerial == INVALID_HANDLE_VALUE))
|
if (unlikely(hSerial == INVALID_HANDLE_VALUE))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
COMMTIMEOUTS cto = {30000, 0, 30000, 0, 30000};
|
||||||
|
SetCommTimeouts(hSerial, &cto);
|
||||||
|
|
||||||
return _open_osfhandle((LONG)hSerial, 0);
|
return _open_osfhandle((LONG)hSerial, 0);
|
||||||
#else
|
#else
|
||||||
int fdDev = open(devpath, O_RDWR | O_CLOEXEC | O_NOCTTY);
|
int fdDev = open(devpath, O_RDWR | O_CLOEXEC | O_NOCTTY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user