From: arighi Date: Fri, 11 Feb 2011 15:02:12 +0000 (+0000) Subject: STM32: USB: handle both input and output requests in the event handler callback X-Git-Tag: 2.7.0~269 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=039caa9fe6ff6a0a0aa1b0bc7644e41e1a1c0689;p=bertos.git STM32: USB: handle both input and output requests in the event handler callback git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4697 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/cortex-m3/drv/usb_stm32.c b/bertos/cpu/cortex-m3/drv/usb_stm32.c index c562512e..794aa891 100644 --- a/bertos/cpu/cortex-m3/drv/usb_stm32.c +++ b/bertos/cpu/cortex-m3/drv/usb_stm32.c @@ -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 */