https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e39b88e3e79f832ba4d52…
commit e39b88e3e79f832ba4d52b3f4766772e148c8679
Author: Vadim Galyant <vgal(a)rambler.ru>
AuthorDate: Fri Dec 1 10:16:24 2017 +0900
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Jan 21 19:35:45 2018 +0100
[USBPORT] Add USB2_GetPrevMicroFrame().
---
drivers/usb/usbport/usb2.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c
index d8d5da9af1..a3c0d1449d 100644
--- a/drivers/usb/usbport/usb2.c
+++ b/drivers/usb/usbport/usb2.c
@@ -52,6 +52,19 @@ USB2_IncMicroFrame(OUT PUCHAR frame,
}
}
+VOID
+NTAPI
+USB2_GetPrevMicroFrame(OUT PUCHAR frame,
+ OUT PUCHAR uframe)
+{
+ *uframe = USB2_MICROFRAMES - 1;
+
+ if (*frame)
+ --*frame;
+ else
+ *frame = USB2_FRAMES - 1;
+}
+
BOOLEAN
NTAPI
USB2_CheckTtEndpointInsert(IN PUSB2_TT_ENDPOINT nextTtEndpoint,