|
|
@@ -24,7 +24,7 @@
|
|
|
#include <io.h>
|
|
|
#endif
|
|
|
|
|
|
-#define DEFAULT_DELAY_TIME 2000
|
|
|
+#define DEFAULT_DELAY_TIME_MS 2
|
|
|
|
|
|
#define DEFAULT_0_9V_sha2 "60"
|
|
|
#define DEFAULT_1_2V_sha2 "0"
|
|
|
@@ -305,7 +305,7 @@ static
|
|
|
int gc3355_write(const int fd, const void * const buf, const size_t bufsz)
|
|
|
{
|
|
|
const int rv = icarus_write(fd, buf, bufsz);
|
|
|
- usleep(DEFAULT_DELAY_TIME);
|
|
|
+ cgsleep_ms(DEFAULT_DELAY_TIME_MS);
|
|
|
return rv;
|
|
|
}
|
|
|
|
|
|
@@ -323,7 +323,7 @@ void gc3355_send_cmds(int fd, const char *cmds[])
|
|
|
|
|
|
hex2bin(ob_bin, cmds[i], strlen(cmds[i]) / 2);
|
|
|
icarus_write(fd, ob_bin, 8);
|
|
|
- usleep(DEFAULT_DELAY_TIME);
|
|
|
+ cgsleep_ms(DEFAULT_DELAY_TIME_MS);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -412,7 +412,7 @@ void gc3355_open_sha2_unit(int fd, char *opt_sha2_gating)
|
|
|
|
|
|
hex2bin(ob_bin, sha2_gating[i], sizeof(ob_bin));
|
|
|
icarus_write(fd, ob_bin, 8);
|
|
|
- usleep(DEFAULT_DELAY_TIME);
|
|
|
+ cgsleep_ms(DEFAULT_DELAY_TIME_MS);
|
|
|
}
|
|
|
|
|
|
opt_sha2_number = sha2_number;
|
|
|
@@ -438,7 +438,7 @@ void gc3355_open_sha2_unit_one_by_one(int fd, char *opt_sha2_gating)
|
|
|
{
|
|
|
hex2bin(ob_bin, sha2_open_cmd[i], sizeof(ob_bin));
|
|
|
icarus_write(fd, ob_bin, 8);
|
|
|
- usleep(DEFAULT_DELAY_TIME * 2);
|
|
|
+ cgsleep_ms(DEFAULT_DELAY_TIME_MS * 2);
|
|
|
}
|
|
|
opt_sha2_number = unit_count;
|
|
|
}
|