Merge pull request #1954 from hichard/master

修复STM32F4-Hal bsp USB主机驱动的一个bug
This commit is contained in:
Bernard Xiong 2018-11-08 01:51:37 +08:00 committed by GitHub
commit 0f1d437844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -179,6 +179,9 @@ static int drv_pipe_xfer(upipe_t pipe, rt_uint8_t token, void *buffer, int nbyte
{ {
pipe->callback(pipe); pipe->callback(pipe);
} }
if (pipe->ep.bEndpointAddress & 0x80) {
return HAL_HCD_HC_GetXferCount(&_stm_hhcd_fs, pipe->pipe_index);
}
return nbytes; return nbytes;
} }
return -1; return -1;