mirror of
https://github.com/reactos/reactos.git
synced 2024-11-09 08:08:38 +00:00
c501d8112c
svn path=/branches/aicom-network-fixes/; revision=34994
29 lines
712 B
C
29 lines
712 B
C
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS kernel
|
|
* FILE: ntoskrnl/dbg/kdb_serial.c
|
|
* PURPOSE: Serial driver
|
|
*
|
|
* PROGRAMMERS: Victor Kirhenshtein (sauros@iname.com)
|
|
* Jason Filby (jasonfilby@yahoo.com)
|
|
* arty
|
|
*/
|
|
|
|
/* INCLUDES ****************************************************************/
|
|
|
|
#include <ntoskrnl.h>
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
CHAR
|
|
KdbpTryGetCharSerial(ULONG Retry)
|
|
{
|
|
CHAR Result = -1;
|
|
|
|
if (Retry == 0)
|
|
while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result));
|
|
else
|
|
while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result) && Retry-- > 0);
|
|
|
|
return Result;
|
|
}
|