ReactOS  0.4.14-dev-50-g13bb5e2
cportlib.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS ComPort Library
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: include/reactos/libs/cportlib/cportlib.h
5  * PURPOSE: Header for the ComPort Library
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #pragma once
12 
13 #include <ntdef.h>
14 
15 //
16 // Return error codes.
17 //
18 #define CP_GET_SUCCESS 0
19 #define CP_GET_NODATA 1
20 #define CP_GET_ERROR 2
21 
22 //
23 // COM port flags.
24 //
25 #define CPPORT_FLAG_MODEM_CONTROL 0x02
26 
27 typedef struct _CPPORT
28 {
32 } CPPORT, *PCPPORT;
33 
34 VOID
35 NTAPI
39 );
40 
41 VOID
42 NTAPI
43 CpSetBaud(
44  IN PCPPORT Port,
45  IN ULONG BaudRate
46 );
47 
49 NTAPI
51  IN PCPPORT Port,
53  IN ULONG BaudRate
54 );
55 
56 BOOLEAN
57 NTAPI
60 );
61 
62 UCHAR
63 NTAPI
64 CpReadLsr(
65  IN PCPPORT Port,
66  IN UCHAR ExpectedValue
67 );
68 
69 USHORT
70 NTAPI
71 CpGetByte(
72  IN PCPPORT Port,
73  OUT PUCHAR Byte,
74  IN BOOLEAN Wait,
75  IN BOOLEAN Poll
76 );
77 
78 VOID
79 NTAPI
80 CpPutByte(
81  IN PCPPORT Port,
82  IN UCHAR Byte
83 );
84 
85 /* EOF */
CPPORT Port[4]
Definition: headless.c:34
#define IN
Definition: typedefs.h:38
unsigned char Byte
Definition: zconf.h:391
UCHAR NTAPI CpReadLsr(IN PCPPORT Port, IN UCHAR ExpectedValue)
Definition: cport.c:234
struct _CPPORT * PCPPORT
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
USHORT NTAPI CpGetByte(IN PCPPORT Port, OUT PUCHAR Byte, IN BOOLEAN Wait, IN BOOLEAN Poll)
Definition: cport.c:256
BOOLEAN NTAPI CpDoesPortExist(IN PUCHAR Address)
Definition: cport.c:227
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
USHORT Flags
Definition: cportlib.h:31
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
VOID NTAPI CpEnableFifo(IN PUCHAR Address, IN BOOLEAN Enable)
Definition: cport.c:54
VOID NTAPI CpPutByte(IN PCPPORT Port, IN UCHAR Byte)
Definition: cport.c:306
unsigned char UCHAR
Definition: xmlstorage.h:181
NTSTATUS NTAPI CpInitialize(IN PCPPORT Port, IN PUCHAR Address, IN ULONG BaudRate)
Definition: cport.c:88
PUCHAR Address
Definition: cportlib.h:29
unsigned short USHORT
Definition: pedump.c:61
ULONG BaudRate
Definition: cportlib.h:30
VOID NTAPI CpSetBaud(IN PCPPORT Port, IN ULONG BaudRate)
Definition: cport.c:65
struct _CPPORT CPPORT
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN Wait
Definition: fatprocs.h:1529