Fix typos
[libftdi] / examples / serial_test.c
index 6a9d8ff..0631504 100644 (file)
@@ -8,9 +8,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#ifdef __WIN32__
-#define sleep(x) Sleep(x)
-#endif
 #include <getopt.h>
 #include <signal.h>
 #include <ftdi.h>
@@ -137,7 +134,7 @@ int main(int argc, char **argv)
      *
      * TODO: Make these parameters settable from the command line
      *
-     * Parameters are choosen that sending a continous stream of 0x55 
+     * Parameters are chosen that sending a continuous stream of 0x55 
      * should give a square wave
      *
      */
@@ -162,7 +159,7 @@ int main(int argc, char **argv)
         else
             f = ftdi_read_data(ftdi, buf, sizeof(buf));
         if (f<0)
-            sleep(1);
+            usleep(1 * 1000000);
         else if(f> 0 && !do_write)
         {
             fprintf(stderr, "read %d bytes\n", f);