mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +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
|
//#define NDEBUG
|
||||||
#include <debug.h>
|
#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
|
USHORT
|
||||||
NTAPI
|
NTAPI
|
||||||
USB2_AddDataBitStuff(IN USHORT DataTime)
|
USB2_AddDataBitStuff(IN USHORT DataTime)
|
||||||
|
|
Loading…
Reference in a new issue