search for: powpan_answer

Displaying 1 result from an estimated 1 matches for "powpan_answer".

2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...00 +++ b/drivers/powerp-bin.c 2011-08-17 00:40:17.000000000 +0300 @@ -232,7 +232,7 @@ static int powpan_command(const char *bu upsdebug_hex(3, "send", buf, bufsize); - usleep(100000); + struct timespec delay = {0, 100e6}; nanosleep(&delay, NULL); ret = ser_get_buf_len(upsfd, powpan_answer, bufsize-1, SER_WAIT_SEC, SER_WAIT_USEC); @@ -427,7 +427,7 @@ static int powpan_status(status_t *statu upsdebug_hex(3, "send", "D\r", 2); - usleep(200000); + struct timespec delay = {0, 200e6}; nanosleep(&delay, NULL); ret = ser_get_buf_len(upsfd, status, sizeof(...