mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[USBPORT] Add USB2_AllocateCheck().
This commit is contained in:
parent
c034297f2d
commit
e701da4923
1 changed files with 21 additions and 0 deletions
|
@ -10,6 +10,27 @@
|
|||
//#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)
|
||||
|
|
Loading…
Reference in a new issue