USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);
- if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
+ if ((EndpointData->EndpointAddress & ENDPOINT_DIR_MASK) == ENDPOINT_DIR_IN)
{
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
EventsEndpoint = EndpointData;
if (Pipe_IsStalled())
{
- USB_Host_ClearPipeStall(SIInterfaceInfo->Config.DataOUTPipeNumber);
+ USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress());
return PIPE_RWSTREAM_PipeStalled;
}
if (Pipe_IsStalled())
{
- USB_Host_ClearPipeStall(SIInterfaceInfo->Config.DataINPipeNumber);
+ USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress());
return PIPE_RWSTREAM_PipeStalled;
}