projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c034297
)
[USBPORT] Add USB2_AllocateCheck().
author
Vadim Galyant
<vgal@rambler.ru>
Wed, 29 Nov 2017 13:33:35 +0000
(22:33 +0900)
committer
Amine Khaldi
<amine.khaldi@reactos.org>
Sun, 21 Jan 2018 18:35:43 +0000
(19:35 +0100)
drivers/usb/usbport/usb2.c
patch
|
blob
|
history
diff --git
a/drivers/usb/usbport/usb2.c
b/drivers/usb/usbport/usb2.c
index
ace40d1
..
080d48c
100644
(file)
--- a/
drivers/usb/usbport/usb2.c
+++ b/
drivers/usb/usbport/usb2.c
@@
-10,6
+10,27
@@
//#define NDEBUG
#include <debug.h>
//#define NDEBUG
#include <debug.h>
+BOOLEAN
+NTAPI
+USB2_AllocateCheck(IN OUT PULONG OutTimeUsed,
+ IN ULONG CalcBusTime,
+ IN ULONG LimitAllocation)
+{
+ ULONG BusTime;
+ BOOLEAN Result = TRUE;
+
+ BusTime = *OutTimeUsed + CalcBusTime;
+ *OutTimeUsed += CalcBusTime;
+
+ if (BusTime > LimitAllocation)
+ {
+ DPRINT("USB2_AllocateCheck: BusTime > LimitAllocation\n");
+ Result = FALSE;
+ }
+
+ return Result;
+}
+
USHORT
NTAPI
USB2_AddDataBitStuff(IN USHORT DataTime)
USHORT
NTAPI
USB2_AddDataBitStuff(IN USHORT DataTime)