Browse Source

chip reset func

John 10 years ago
parent
commit
645c43c897
1 changed files with 4 additions and 2 deletions
  1. 4 2
      driver-futurebit.c

+ 4 - 2
driver-futurebit.c

@@ -18,6 +18,8 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
+#include <stropts.h>
+#include <termios.h>
 
 #include "deviceapi.h"
 #include "logging.h"
@@ -230,7 +232,7 @@ bool futurebit_detect_one(const char * const devpath)
 	
 	applog(LOG_DEBUG, "%s: %s %s", futurebit_drv.dname, "Successfully opened", devpath);
 	
-	futurebit_reset_board(devpath);
+	futurebit_reset_board(fd);
 	
 	// Init chips, setup PLL, and scan for good cores
 	chips = malloc(futurebit_max_chips * sizeof(*chips));
@@ -282,7 +284,7 @@ bool futurebit_detect_one(const char * const devpath)
 	if (!total_cores)
 		goto err;
 	
-	futurebit_reset_board(devpath);
+	futurebit_reset_board(fd);
 	
 	// config nonce ranges per cluster based on core responses
 	unsigned mutiple = FUTUREBIT_MAX_NONCE / total_cores;