Fixed Pipe_IsEndpointBound() function not taking the endpoint's direction into account.
Re-added Pipe_IsEndpointBound() calls to the CDC and RNDIS host class drivers, not that the function has the correct behaviour for devices with bidirectional endpoints.
This commit is contained in:
parent
bb1a036f09
commit
b6a4584a19
9 changed files with 44 additions and 24 deletions
|
@ -78,8 +78,15 @@ bool Pipe_IsEndpointBound(const uint8_t EndpointAddress)
|
|||
{
|
||||
Pipe_SelectPipe(PNum);
|
||||
|
||||
if (Pipe_IsConfigured() && (Pipe_BoundEndpointNumber() == (EndpointAddress & PIPE_EPNUM_MASK)))
|
||||
return true;
|
||||
uint8_t PipeToken = Pipe_GetPipeToken();
|
||||
|
||||
if (PipeToken != PIPE_TOKEN_SETUP)
|
||||
PipeToken = (PipeToken == ((EndpointAddress & PIPE_EPDIR_MASK) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT));
|
||||
|
||||
if (Pipe_IsConfigured() && (Pipe_BoundEndpointNumber() == (EndpointAddress & PIPE_EPNUM_MASK)) && PipeToken)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Pipe_SelectPipe(PrevPipeNumber);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue