ReactOS
0.4.16-dev-1093-g93e9710
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
ioaccess.h
Go to the documentation of this file.
1
/*
2
* ioaccess.h
3
*
4
* Windows Device Driver Kit
5
*
6
* This file is part of the w32api package.
7
*
8
* THIS SOFTWARE IS NOT COPYRIGHTED
9
*
10
* This source code is offered for use in the public domain. You may
11
* use, modify or distribute it freely.
12
*
13
* This code is distributed in the hope that it will be useful but
14
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
15
* DISCLAIMED. This includes but is not limited to warranties of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
*
18
*/
19
#ifndef __IOACCESS_H
20
#define __IOACCESS_H
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
#define H2I(p) PtrToUshort(p)
27
28
#ifndef NO_PORT_MACROS
29
30
#if defined(_X86_) || defined(_M_AMD64)
31
#define READ_REGISTER_UCHAR(r) (*(volatile UCHAR *)(r))
32
#define READ_REGISTER_USHORT(r) (*(volatile USHORT *)(r))
33
#define READ_REGISTER_ULONG(r) (*(volatile ULONG *)(r))
34
#define WRITE_REGISTER_UCHAR(r, v) (*(volatile UCHAR *)(r) = (v))
35
#define WRITE_REGISTER_USHORT(r, v) (*(volatile USHORT *)(r) = (v))
36
#define WRITE_REGISTER_ULONG(r, v) (*(volatile ULONG *)(r) = (v))
37
#define READ_PORT_UCHAR(p) (UCHAR)(__inbyte (H2I(p)))
38
#define READ_PORT_USHORT(p) (USHORT)(__inword (H2I(p)))
39
#define READ_PORT_ULONG(p) (ULONG)(__indword (H2I(p)))
40
#define WRITE_PORT_UCHAR(p, v) __outbyte (H2I(p), (v))
41
#define WRITE_PORT_USHORT(p, v) __outword (H2I(p), (v))
42
#define WRITE_PORT_ULONG(p, v) __outdword (H2I(p), (v))
43
44
#define MEMORY_BARRIER()
45
46
#elif defined(_PPC_) || defined(_MIPS_) || defined(_ARM_)
47
48
#define READ_REGISTER_UCHAR(r) (*(volatile UCHAR * const)(r))
49
#define READ_REGISTER_USHORT(r) (*(volatile USHORT * const)(r))
50
#define READ_REGISTER_ULONG(r) (*(volatile ULONG * const)(r))
51
#define WRITE_REGISTER_UCHAR(r, v) (*(volatile UCHAR * const)(r) = (v))
52
#define WRITE_REGISTER_USHORT(r, v) (*(volatile USHORT * const)(r) = (v))
53
#define WRITE_REGISTER_ULONG(r, v) (*(volatile ULONG * const)(r) = (v))
54
#define READ_PORT_UCHAR(r) READ_REGISTER_UCHAR(r)
55
#define READ_PORT_USHORT(r) READ_REGISTER_USHORT(r)
56
#define READ_PORT_ULONG(r) READ_REGISTER_ULONG(r)
57
#define WRITE_PORT_UCHAR(p, v) WRITE_REGISTER_UCHAR(p, (UCHAR) (v))
58
#define WRITE_PORT_USHORT(p, v) WRITE_REGISTER_USHORT(p, (USHORT) (v))
59
#define WRITE_PORT_ULONG(p, v) WRITE_REGISTER_ULONG(p, (ULONG) (v))
60
61
#else
62
63
#error Unsupported architecture
64
65
#endif
66
67
#endif
/* NO_PORT_MACROS */
68
69
#ifdef __cplusplus
70
}
71
#endif
72
73
#endif
/* __IOACCESS_H */
sdk
include
ddk
ioaccess.h
Generated on Mon May 5 2025 06:12:05 for ReactOS by
1.9.6