]> Joshua Wise's Git repositories - s3load.git/commitdiff
Do a full USB reset, for compatibility with newer NEXYS2 boards.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Wed, 9 Jul 2008 02:43:05 +0000 (22:43 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Wed, 9 Jul 2008 02:43:05 +0000 (22:43 -0400)
libnexys.c

index 9fbf833dfdd0eb03a50e974df4fe9b8b58a5c71d..023484903467729adbab7720de877962f4769b04 100644 (file)
@@ -45,9 +45,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.055554 seconds and 4 git commands to generate.