Skip to content

Commit 0f1d437

Browse files
authored
Merge pull request #1954 from hichard/master
修复STM32F4-Hal bsp USB主机驱动的一个bug
2 parents 9d55baa + ca4b48a commit 0f1d437

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bsp/stm32f4xx-HAL/drivers/drv_usbh.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ static int drv_pipe_xfer(upipe_t pipe, rt_uint8_t token, void *buffer, int nbyte
179179
{
180180
pipe->callback(pipe);
181181
}
182+
if (pipe->ep.bEndpointAddress & 0x80) {
183+
return HAL_HCD_HC_GetXferCount(&_stm_hhcd_fs, pipe->pipe_index);
184+
}
182185
return nbytes;
183186
}
184187
return -1;

0 commit comments

Comments
 (0)