ReactOS
0.4.16-dev-1044-ga6558c0
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 Sun Apr 27 2025 06:09:15 for ReactOS by
1.9.6