usb reset bug fix
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Sep 2015 01:04:59 +0000 (10:04 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Sep 2015 01:04:59 +0000 (10:04 +0900)
ChangeLog
src/usb_ctrl.c

index 1937d3c..bc3f62c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-09-15  Niibe Yutaka  <gniibe@fsij.org>
 
+       * src/usb_ctrl.c (usb_cb_device_reset): Stop the interface.
+
        * src/usb_stm32f103.c (std_set_interface): Bug fix for conf.
 
        * src/gnuk.ld.in (__process3_stack_size__): Increase stack size of
index 0d69f05..3dbe45c 100644 (file)
@@ -211,8 +211,9 @@ usb_cb_device_reset (void)
   usb_lld_setup_endpoint (ENDP0, EP_CONTROL, 0, ENDP0_RXADDR, ENDP0_TXADDR,
                          GNUK_MAX_PACKET_SIZE);
 
+  /* Stop the interface */
   for (i = 0; i < NUM_INTERFACES; i++)
-    gnuk_setup_endpoints_for_interface (i, 0);
+    gnuk_setup_endpoints_for_interface (i, 1);
 
   bDeviceState = ATTACHED;
   led_blink (LED_USB_RESET);   /* Notify the main.  */