ReactOS 0.4.16-dev-2491-g3dc6630
cportlib.h File Reference
#include <ntdef.h>
Include dependency graph for cportlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _CPPORT
 

Macros

#define CP_GET_SUCCESS   0
 
#define CP_GET_NODATA   1
 
#define CP_GET_ERROR   2
 
#define CPPORT_FLAG_MODEM_CONTROL   0x02
 

Typedefs

typedef struct _CPPORT CPPORT
 
typedef struct _CPPORTPCPPORT
 

Functions

BOOLEAN NTAPI CpDoesPortExist (_In_ PUCHAR Address)
 
VOID NTAPI CpEnableFifo (_In_ PUCHAR Address, _In_ BOOLEAN Enable)
 
VOID NTAPI CpSetBaud (_Inout_ PCPPORT Port, _In_ ULONG BaudRate)
 
NTSTATUS NTAPI CpInitialize (_Inout_ PCPPORT Port, _In_ PUCHAR Address, _In_ ULONG BaudRate)
 
USHORT NTAPI CpGetByte (_Inout_ PCPPORT Port, _Out_ PUCHAR Byte, _In_ BOOLEAN Wait, _In_ BOOLEAN Poll)
 
VOID NTAPI CpPutByte (_Inout_ PCPPORT Port, _In_ UCHAR Byte)
 

Macro Definition Documentation

◆ CP_GET_ERROR

#define CP_GET_ERROR   2

Definition at line 19 of file cportlib.h.

◆ CP_GET_NODATA

#define CP_GET_NODATA   1

Definition at line 18 of file cportlib.h.

◆ CP_GET_SUCCESS

#define CP_GET_SUCCESS   0

Definition at line 17 of file cportlib.h.

◆ CPPORT_FLAG_MODEM_CONTROL

#define CPPORT_FLAG_MODEM_CONTROL   0x02

Definition at line 24 of file cportlib.h.

Typedef Documentation

◆ CPPORT

◆ PCPPORT

typedef struct _CPPORT * PCPPORT

Function Documentation

◆ CpDoesPortExist()

BOOLEAN NTAPI CpDoesPortExist ( _In_ PUCHAR  Address)

Definition at line 33 of file cport.c.

35{
37}
BOOLEAN NTAPI Uart16550DoesPortExist(_In_ PUCHAR Address)
Definition: ns16550.c:138
static WCHAR Address[46]
Definition: ping.c:68

Referenced by CpInitialize(), DetectKeyboardController(), DetectSerialPorts(), InbvPortInitialize(), KdDebuggerInitialize0(), KdPortInitializeEx(), and WinLdrPortInitialize().

◆ CpEnableFifo()

VOID NTAPI CpEnableFifo ( _In_ PUCHAR  Address,
_In_ BOOLEAN  Enable 
)

Definition at line 41 of file cport.c.

44{
46}
VOID NTAPI Uart16550EnableFifo(_In_ PUCHAR Address, _In_ BOOLEAN Enable)
Definition: ns16550.c:146
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142

Referenced by CpInitialize(), InbvPortEnableFifo(), and WinLdrEnableFifo().

◆ CpGetByte()

USHORT NTAPI CpGetByte ( _Inout_ PCPPORT  Port,
_Out_ PUCHAR  Byte,
_In_ BOOLEAN  Wait,
_In_ BOOLEAN  Poll 
)

Definition at line 82 of file cport.c.

87{
88 return Uart16550GetByte(Port, Byte, Wait, Poll);
89}
unsigned char Byte
Definition: zlib.h:37
CPPORT Port[4]
Definition: headless.c:38
USHORT NTAPI Uart16550GetByte(_Inout_ PCPPORT Port, _Out_ PUCHAR Byte, _In_ BOOLEAN Wait, _In_ BOOLEAN Poll)
Definition: ns16550.c:250
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170

Referenced by InbvPortGetByte(), InbvPortPollOnly(), KdPortGetByteEx(), KdpPollByte(), KdpReceiveByte(), WinLdrPortGetByte(), and WinLdrPortPollOnly().

◆ CpInitialize()

NTSTATUS NTAPI CpInitialize ( _Inout_ PCPPORT  Port,
_In_ PUCHAR  Address,
_In_ ULONG  BaudRate 
)

Definition at line 59 of file cport.c.

63{
64 /* Validity checks */
65 if (Port == NULL || Address == NULL || BaudRate == 0)
67
68#if 0
70 return STATUS_NOT_FOUND;
71
72 /* Initialize port data */
74 Port->BaudRate = 0;
75 Port->Flags = 0;
76#endif
77 return Uart16550Initialize(Port, Address, BaudRate);
78}
BOOLEAN NTAPI CpDoesPortExist(_In_ PUCHAR Address)
Definition: cport.c:33
#define NULL
Definition: types.h:112
NTSTATUS NTAPI Uart16550Initialize(_Inout_ PCPPORT Port, _In_ PUCHAR Address, _In_ ULONG BaudRate)
Definition: ns16550.c:182
#define STATUS_NOT_FOUND
Definition: shellext.h:72
PUCHAR Address
Definition: cportlib.h:28
ULONG BaudRate
Definition: cportlib.h:29
USHORT Flags
Definition: cportlib.h:30
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

Referenced by InbvPortInitialize(), KdDebuggerInitialize0(), KdPortInitializeEx(), KdpPortInitialize(), LlbHwOmap3UartInitialize(), and WinLdrPortInitialize().

◆ CpPutByte()

VOID NTAPI CpPutByte ( _Inout_ PCPPORT  Port,
_In_ UCHAR  Byte 
)

Definition at line 93 of file cport.c.

96{
98}
VOID NTAPI Uart16550PutByte(_Inout_ PCPPORT Port, _In_ UCHAR Byte)
Definition: ns16550.c:303

Referenced by InbvPortPutByte(), KdPortPutByteEx(), KdpSendByte(), LlbHwUartSendChar(), and WinLdrPortPutByte().

◆ CpSetBaud()

VOID NTAPI CpSetBaud ( _Inout_ PCPPORT  Port,
_In_ ULONG  BaudRate 
)

Definition at line 50 of file cport.c.

53{
54 Uart16550SetBaud(Port, BaudRate);
55}
VOID NTAPI Uart16550SetBaud(_Inout_ PCPPORT Port, _In_ ULONG BaudRate)
Definition: ns16550.c:158

Referenced by CpInitialize().