*** empty log message ***
[reactos.git] / reactos / ntoskrnl / hal / x86 / portio.c
1 /* $Id: portio.c,v 1.3 2000/03/04 20:45:34 ea Exp $
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/x86/portio.c
6 * PURPOSE: Port I/O functions
7 * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
8 * UPDATE HISTORY:
9 * Created 18/10/99
10 */
11
12 #include <ddk/ntddk.h>
13 #include <internal/halio.h>
14
15
16 /* FUNCTIONS ****************************************************************/
17
18 VOID
19 STDCALL
20 READ_PORT_BUFFER_UCHAR (PUCHAR Port,
21 PUCHAR Buffer,
22 ULONG Count)
23 {
24 insb ((ULONG)Port, Buffer, Count);
25 }
26
27
28 VOID
29 STDCALL
30 READ_PORT_BUFFER_ULONG (PULONG Port,
31 PULONG Buffer,
32 ULONG Count)
33 {
34 insl ((ULONG)Port, Buffer, Count);
35 }
36
37
38 VOID
39 STDCALL
40 READ_PORT_BUFFER_USHORT (PUSHORT Port,
41 PUSHORT Buffer,
42 ULONG Count)
43 {
44 insw ((ULONG)Port, Buffer, Count);
45 }
46
47
48 UCHAR
49 STDCALL
50 READ_PORT_UCHAR (PUCHAR Port)
51 {
52 return inb_p ((ULONG)Port);
53 }
54
55
56 ULONG
57 STDCALL
58 READ_PORT_ULONG (PULONG Port)
59 {
60 return inl_p ((ULONG)Port);
61 }
62
63
64 USHORT
65 STDCALL
66 READ_PORT_USHORT (PUSHORT Port)
67 {
68 return inw_p ((ULONG)Port);
69 }
70
71
72 VOID
73 STDCALL
74 WRITE_PORT_BUFFER_UCHAR (PUCHAR Port,
75 PUCHAR Buffer,
76 ULONG Count)
77 {
78 outsb ((ULONG)Port, Buffer, Count);
79 }
80
81
82 VOID
83 STDCALL
84 WRITE_PORT_BUFFER_ULONG (PULONG Port,
85 PULONG Buffer,
86 ULONG Count)
87 {
88 outsl ((ULONG)Port, Buffer, Count);
89 }
90
91
92 VOID
93 STDCALL
94 WRITE_PORT_BUFFER_USHORT (PUSHORT Port,
95 PUSHORT Buffer,
96 ULONG Count)
97 {
98 outsw ((ULONG)Port, Buffer, Count);
99 }
100
101
102 VOID
103 STDCALL
104 WRITE_PORT_UCHAR (PUCHAR Port,
105 UCHAR Value)
106 {
107 outb_p ((ULONG)Port, Value);
108 }
109
110
111 VOID
112 STDCALL
113 WRITE_PORT_ULONG (PULONG Port,
114 ULONG Value)
115 {
116 outl_p ((ULONG)Port, Value);
117 }
118
119
120 VOID
121 STDCALL
122 WRITE_PORT_USHORT (PUSHORT Port,
123 USHORT Value)
124 {
125 outw_p ((ULONG)Port, Value);
126 }
127
128 /* EOF */