- split logoff and shutdown resources
[reactos.git] / reactos / ntoskrnl / kdbg / kdb_serial.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/dbg/kdb_serial.c
6 * PURPOSE: Serial driver
7 *
8 * PROGRAMMERS: Victor Kirhenshtein (sauros@iname.com)
9 * Jason Filby (jasonfilby@yahoo.com)
10 * arty
11 */
12
13 /* INCLUDES ****************************************************************/
14
15 #include <ntoskrnl.h>
16 #define NDEBUG
17 #include <debug.h>
18
19 CHAR
20 KdbpTryGetCharSerial(UINT Retry)
21 {
22 CHAR Result = -1;
23
24 if (Retry == 0)
25 while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result));
26 else
27 while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result) && Retry-- > 0);
28
29 return Result;
30 }