From ca4b48aac25efcb54c3d69779aba01731734d823 Mon Sep 17 00:00:00 2001 From: hichard Date: Wed, 7 Nov 2018 22:48:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSTM32F4-Hal=20bsp=20USB?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E9=A9=B1=E5=8A=A8=E7=9A=84=E4=B8=80=E4=B8=AA?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32f4xx-HAL/drivers/drv_usbh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bsp/stm32f4xx-HAL/drivers/drv_usbh.c b/bsp/stm32f4xx-HAL/drivers/drv_usbh.c index 6065e06f8..e002c2f7e 100644 --- a/bsp/stm32f4xx-HAL/drivers/drv_usbh.c +++ b/bsp/stm32f4xx-HAL/drivers/drv_usbh.c @@ -179,6 +179,9 @@ static int drv_pipe_xfer(upipe_t pipe, rt_uint8_t token, void *buffer, int nbyte { pipe->callback(pipe); } + if (pipe->ep.bEndpointAddress & 0x80) { + return HAL_HCD_HC_GetXferCount(&_stm_hhcd_fs, pipe->pipe_index); + } return nbytes; } return -1; -- GitLab