From 73dc0db7258121f260eeda04f50531f3eda943ee Mon Sep 17 00:00:00 2001 From: Maksim Kuleshov Date: Fri, 5 Apr 2013 08:06:10 +0000 Subject: Usleep() is not found in all versions of MinGW, use Sleep() on Windows Handle long sleeps on non-Windows correctly. Corresponding to flashrom svn r1667. Signed-off-by: Maksim Kuleshov Signed-off-by: Carl-Daniel Hailfinger Acked-by: Stefan Tauner --- buspirate_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'buspirate_spi.c') diff --git a/buspirate_spi.c b/buspirate_spi.c index d2ebc75..9d229f4 100644 --- a/buspirate_spi.c +++ b/buspirate_spi.c @@ -286,7 +286,7 @@ int buspirate_spi_init(void) /* The Bus Pirate can't handle UART input buffer overflow in BBIO mode, and sending a sequence * of 0x00 too fast apparently triggers such an UART input buffer overflow. */ - usleep(10000); + internal_sleep(10000); } /* We know that 20 commands of \0 should elicit at least one BBIO1 response. */ if ((ret = buspirate_wait_for_string(bp_commbuf, "BBIO"))) -- cgit v1.1