diff options
| author | hichard <[email protected]> | 2018-11-07 22:48:50 +0800 |
|---|---|---|
| committer | hichard <[email protected]> | 2018-11-07 22:48:50 +0800 |
| commit | ca4b48aac25efcb54c3d69779aba01731734d823 (patch) | |
| tree | 5c86bb5ddaa1149edf1ec9f25294b9415c7e08d3 | |
| parent | 9d55baa7c6e01368fe8046a440e8e6462125a76c (diff) | |
修复STM32F4-Hal bsp USB主机驱动的一个bug
| -rw-r--r-- | bsp/stm32f4xx-HAL/drivers/drv_usbh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bsp/stm32f4xx-HAL/drivers/drv_usbh.c b/bsp/stm32f4xx-HAL/drivers/drv_usbh.c index 6065e06f8e..e002c2f7e6 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; |
