STM32: USB: handle both input and output requests in the event handler callback
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 11 Feb 2011 15:02:12 +0000 (15:02 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 11 Feb 2011 15:02:12 +0000 (15:02 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4697 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/drv/usb_stm32.c

index c562512e1bb9858230136bcaf41d43e07d68e3db..794aa8916f2e050461d5858b2972ca36964170e0 100644 (file)
@@ -1495,11 +1495,8 @@ static void usb_get_descriptor_handler(void)
        if ((setup_packet.mRequestType & USB_RECIP_MASK) ==
                        USB_RECIP_DEVICE)
                usb_get_descriptor();
-       /* Getting descriptor for a device is a standard request */
-       else if ((setup_packet.mRequestType & USB_DIR_MASK) == USB_DIR_IN)
-               usb_event_handler(usb_dev);
        else
-               ep_cnfg[CTRL_ENP_OUT].status = STALLED;
+               usb_event_handler(usb_dev);
 }
 
 /* USB setup packet: SET_ADDRESS handler */