ReactOS  0.4.15-dev-3439-g2693a26
portio.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS HAL
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: hal/halx86/generic/portio.c
5  * PURPOSE: I/O Functions for access to ports
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <hal.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 //
16 // HAL Port to Inlined Port
17 //
18 #define H2I(Port) PtrToUshort(Port)
19 
20 /* FUNCTIONS *****************************************************************/
21 
22 VOID
23 NTAPI
26  IN ULONG Count)
27 {
29 }
30 
31 VOID
32 NTAPI
35  IN ULONG Count)
36 {
38 }
39 
40 VOID
41 NTAPI
44  IN ULONG Count)
45 {
47 }
48 
49 UCHAR
50 NTAPI
52 {
53  return __inbyte(H2I(Port));
54 }
55 
56 USHORT
57 NTAPI
59 {
60  return __inword(H2I(Port));
61 }
62 
63 ULONG
64 NTAPI
66 {
67  return __indword(H2I(Port));
68 }
69 
70 VOID
71 NTAPI
74  IN ULONG Count)
75 {
77 }
78 
79 VOID
80 NTAPI
83  IN ULONG Count)
84 {
86 }
87 
88 VOID
89 NTAPI
92  IN ULONG Count)
93 {
95 }
96 
97 VOID
98 NTAPI
100  IN UCHAR Value)
101 {
102  __outbyte(H2I(Port), Value);
103 }
104 
105 VOID
106 NTAPI
108  IN USHORT Value)
109 {
110  __outword(H2I(Port), Value);
111 }
112 
113 VOID
114 NTAPI
116  IN ULONG Value)
117 {
119 }
120 
121 /* EOF */
CPPORT Port[4]
Definition: headless.c:35
#define IN
Definition: typedefs.h:39
PPC_QUAL void __inbytestring(unsigned long Port, unsigned char *Buffer, unsigned long Count)
Definition: intrin_ppc.h:584
VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
Definition: portio.c:115
VOID NTAPI WRITE_PORT_BUFFER_UCHAR(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: portio.c:77
UCHAR NTAPI READ_PORT_UCHAR(IN PUCHAR Port)
Definition: portio.c:56
PPC_QUAL void __outbytestring(unsigned long const Port, const unsigned char *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:653
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
Definition: portio.c:70
VOID NTAPI READ_PORT_BUFFER_UCHAR(IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count)
Definition: portio.c:26
PPC_QUAL unsigned long __indword(const unsigned long Port)
Definition: intrin_ppc.h:569
#define H2I(Port)
Definition: portio.c:18
PPC_QUAL void __outbyte(unsigned long const Port, const unsigned char Data)
Definition: intrin_ppc.h:605
PPC_QUAL void __outdwordstring(unsigned long const Port, const unsigned long *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:671
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
Definition: portio.c:123
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
Definition: bufpool.h:45
PPC_QUAL unsigned short __inword(const unsigned long Port)
Definition: intrin_ppc.h:554
PPC_QUAL void __outword(unsigned long const Port, const unsigned short Data)
Definition: intrin_ppc.h:621
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
int Count
Definition: noreturn.cpp:7
PPC_QUAL void __outwordstring(unsigned long const Port, const unsigned short *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:662
VOID NTAPI READ_PORT_BUFFER_USHORT(IN PUSHORT Port, OUT PUSHORT Buffer, IN ULONG Count)
Definition: portio.c:36
unsigned char UCHAR
Definition: xmlstorage.h:181
PPC_QUAL void __indwordstring(unsigned long Port, unsigned long *Buffer, unsigned long Count)
Definition: intrin_ppc.h:598
unsigned short USHORT
Definition: pedump.c:61
unsigned int * PULONG
Definition: retypes.h:1
PPC_QUAL void __outdword(unsigned long const Port, const unsigned long Data)
Definition: intrin_ppc.h:637
PPC_QUAL void __inwordstring(unsigned long Port, unsigned short *Buffer, unsigned long Count)
Definition: intrin_ppc.h:591
#define OUT
Definition: typedefs.h:40
VOID NTAPI READ_PORT_BUFFER_ULONG(IN PULONG Port, OUT PULONG Buffer, IN ULONG Count)
Definition: portio.c:46
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI WRITE_PORT_UCHAR(IN PUCHAR Port, IN UCHAR Value)
Definition: portio.c:107
USHORT NTAPI READ_PORT_USHORT(IN PUSHORT Port)
Definition: portio.c:63
VOID NTAPI WRITE_PORT_BUFFER_ULONG(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: portio.c:97
unsigned short * PUSHORT
Definition: retypes.h:2
VOID NTAPI WRITE_PORT_BUFFER_USHORT(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: portio.c:87
PPC_QUAL unsigned char __inbyte(const unsigned long Port)
Definition: intrin_ppc.h:539