https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0216b033ccdd886d10395…
commit 0216b033ccdd886d10395279766a87907e830881
Author: Vadim Galyant <vgal(a)rambler.ru>
AuthorDate: Wed Nov 29 23:50:26 2017 +0900
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Jan 21 19:35:44 2018 +0100
[USBPORT] Add USB2_GetLastIsoTime().
---
drivers/usb/usbport/usb2.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c
index ad8375db20..94c2844bd7 100644
--- a/drivers/usb/usbport/usb2.c
+++ b/drivers/usb/usbport/usb2.c
@@ -132,6 +132,33 @@ USB2_GetOverhead(IN PUSB2_TT_ENDPOINT TtEndpoint)
return Overhead;
}
+ULONG
+NTAPI
+USB2_GetLastIsoTime(IN PUSB2_TT_ENDPOINT TtEndpoint,
+ IN ULONG Frame)
+{
+ PUSB2_TT_ENDPOINT nextTtEndpoint;
+ ULONG Result;
+
+ DPRINT("USB2_GetLastIsoTime: TtEndpoint - %p, Frame - %X\n",
+ TtEndpoint,
+ Frame);
+
+ nextTtEndpoint =
TtEndpoint->Tt->FrameBudget[Frame].IsoEndpoint->NextTtEndpoint;
+
+ if (nextTtEndpoint ||
+ (nextTtEndpoint = TtEndpoint->Tt->FrameBudget[Frame].AltEndpoint) != NULL)
+ {
+ Result = nextTtEndpoint->StartTime + nextTtEndpoint->CalcBusTime;
+ }
+ else
+ {
+ Result = USB2_FS_SOF_TIME;
+ }
+
+ return Result;
+}
+
VOID
NTAPI
USB2_InitTtEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,