usb reset bug fix

This commit is contained in:
NIIBE Yutaka
2015-09-15 10:04:59 +09:00
parent 1f9e8ca77f
commit c53bd96eb8
2 changed files with 4 additions and 1 deletions

View File

@@ -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

View 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. */