From 039caa9fe6ff6a0a0aa1b0bc7644e41e1a1c0689 Mon Sep 17 00:00:00 2001 From: arighi Date: Fri, 11 Feb 2011 15:02:12 +0000 Subject: [PATCH] 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 --- bertos/cpu/cortex-m3/drv/usb_stm32.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 */ -- 2.25.1