ReactOS 0.4.16-dev-2498-g8632030
cport.c File Reference
#include <ntstatus.h>
#include <cportlib/cportlib.h>
#include "ns16550.c"
Include dependency graph for cport.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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)
 

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().

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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