diff --git a/bsp/stm32f4xx-HAL/drivers/drv_usbh.c b/bsp/stm32f4xx-HAL/drivers/drv_usbh.c index 6065e06f8ea01b71b0de4104f151963fabc22421..e002c2f7e66e229cacca9ff608f71dc93bd9679a 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;