ReactOS
0.4.16-dev-297-gc569aee
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
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
_
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
empty_card.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS API Tests
3
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4
* PURPOSE: Dummy card resource tests for the ISA PnP bus driver
5
* COPYRIGHT: Copyright 2024 Dmitry Borisov <di.sean@protonmail.com>
6
*/
7
8
/* INCLUDES *******************************************************************/
9
10
#include "
precomp.h
"
11
12
/* GLOBALS ********************************************************************/
13
14
static
UCHAR
DrvpTestPnpRom
[] =
15
{
16
0x49, 0xF3,
// Vendor ID 0xF349 'ROS'
17
0x55, 0x66,
// Product ID 0x5566
18
0xFF, 0xFF, 0xFF, 0xFF,
// Serial Number
19
0xFF,
// Checksum (dummy)
20
21
0x0A, 0x10, 0x10,
// PnP version 1.0, vendor version 1.0
22
23
0x82, 6, 0x00,
// ANSI identifier 'Test 2'
24
'T'
,
'e'
,
's'
,
't'
,
' '
,
'2'
,
25
26
/* ********************* DEVICE 1 ********************* */
27
28
0x15,
// Logical device ID
29
0x24, 0x08,
// Vendor ID 0x0824 'BAD'
30
0x30, 0x00,
// Product ID 0x3000
31
0x00,
32
33
0x82, 0xCC, 0xCC,
// Long ANSI identifier to verify resource data bounds checking
34
35
/* **************************************************** */
36
37
0x79,
// END
38
0xFF,
// Checksum (dummy)
39
};
40
41
/* FUNCTIONS ******************************************************************/
42
43
VOID
44
DrvCreateCard2
(
45
_In_
PISAPNP_CARD
Card
)
46
{
47
PISAPNP_CARD_LOGICAL_DEVICE
LogDev;
48
49
IsaBusCreateCard
(
Card
,
DrvpTestPnpRom
,
sizeof
(
DrvpTestPnpRom
), 1);
50
51
/* ********************* DEVICE 1 ********************* */
52
LogDev = &
Card
->LogDev[0];
53
54
/* Enable decodes */
55
LogDev->
Registers
[0x30] = 0x01;
56
57
/* No DMA is active */
58
LogDev->
Registers
[0x74] = 0x04;
59
LogDev->
Registers
[0x75] = 0x04;
60
}
Card
Definition:
card.h:28
DrvpTestPnpRom
static UCHAR DrvpTestPnpRom[]
Definition:
empty_card.c:14
DrvCreateCard2
VOID DrvCreateCard2(_In_ PISAPNP_CARD Card)
Definition:
empty_card.c:44
void
Definition:
nsiface.idl:2307
IsaBusCreateCard
VOID IsaBusCreateCard(_Inout_ PISAPNP_CARD Card, _In_ PVOID PnpRom, _In_ ULONG RomSize, _In_ ULONG LogicalDevices)
Definition:
isabus.c:439
_In_
#define _In_
Definition:
no_sal2.h:158
_ISAPNP_CARD_LOGICAL_DEVICE
Definition:
precomp.h:109
_ISAPNP_CARD_LOGICAL_DEVICE::Registers
UCHAR Registers[0xFF]
Definition:
precomp.h:110
_ISAPNP_CARD
Definition:
precomp.h:116
precomp.h
UCHAR
unsigned char UCHAR
Definition:
xmlstorage.h:181
modules
rostests
unittests
isapnp
empty_card.c
Generated on Wed Nov 27 2024 06:08:47 for ReactOS by
1.9.6