mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[USBPORT] Add USB2_CommonFrames().
This commit is contained in:
parent
ae800da85b
commit
3031695100
1 changed files with 27 additions and 0 deletions
|
@ -711,6 +711,33 @@ USB2_MoveTtEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
USB2_CommonFrames(IN PUSB2_TT_ENDPOINT NextTtEndpoint,
|
||||
IN PUSB2_TT_ENDPOINT TtEndpoint)
|
||||
{
|
||||
UCHAR Frame;
|
||||
|
||||
DPRINT("USB2_CommonFrames: \n");
|
||||
|
||||
if (NextTtEndpoint->ActualPeriod == ENDPOINT_INTERRUPT_1ms ||
|
||||
TtEndpoint->ActualPeriod == ENDPOINT_INTERRUPT_1ms)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (NextTtEndpoint->ActualPeriod < TtEndpoint->ActualPeriod)
|
||||
{
|
||||
Frame = TtEndpoint->StartFrame % TtEndpoint->ActualPeriod;
|
||||
}
|
||||
else
|
||||
{
|
||||
Frame = NextTtEndpoint->StartFrame % TtEndpoint->ActualPeriod;
|
||||
}
|
||||
|
||||
return (Frame == TtEndpoint->StartFrame);
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
USB2_ConvertFrame(IN UCHAR Frame,
|
||||
|
|
Loading…
Reference in a new issue