]> Joshua Wise's Git repositories - s3load.git/blobdiff - libnexys.c
GPLv2
[s3load.git] / libnexys.c
index 9fbf833dfdd0eb03a50e974df4fe9b8b58a5c71d..bbea3838ff2d2ef10fbab6fb256319a54c1754c4 100644 (file)
@@ -1,3 +1,16 @@
+/* libnexys.c
+ * Main libusb driver for libnexys
+ * libnexys, a free driver for Digilent NEXYS2 boards
+ *
+ * Copyright (c) 2007-2008 Joshua Wise
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License.
+ *
+ * Commercial licenses are available by request.
+ */
+
 #ifdef WIN32_NATIVE
 #include "libnexys.win32.c"
 #else
@@ -45,9 +58,9 @@ nexys2_t nexys2_init(void) {
                return NULL;
        }
        
-       if (usb_clear_halt(udev, 0x01) < 0)     /* Sometimes the board locks up when you close it, so send this. */
+       if (usb_reset(udev) < 0)        /* Sometimes the board locks up when you close it, so send this. */
        {
-               fprintf(stderr, "nexys2_init: failed to clear halt on interface 0x01\n");
+               fprintf(stderr, "nexys2_init: failed to reset the USB (%s)\n", usb_strerror());
                return NULL;
        }
        
This page took 0.024484 seconds and 4 git commands to generate.