[USBPORT] Add USB2_GetPrevMicroFrame().
authorVadim Galyant <vgal@rambler.ru>
Fri, 1 Dec 2017 01:16:24 +0000 (10:16 +0900)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 21 Jan 2018 18:35:45 +0000 (19:35 +0100)
drivers/usb/usbport/usb2.c

index d8d5da9..a3c0d14 100644 (file)
@@ -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,