b147c25a62b8a46058f79aa0187e359db1c0f920
[reactos.git] / reactos / include / ddk / miniport.h
1 /*
2 * miniport.h
3 *
4 * Type definitions for miniport drivers
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #ifndef _MINIPORT_
24 #define _MINIPORT_
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #define EMULATOR_READ_ACCESS 0x01
31 #define EMULATOR_WRITE_ACCESS 0x02
32
33 typedef enum _EMULATOR_PORT_ACCESS_TYPE {
34 Uchar,
35 Ushort,
36 Ulong
37 } EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
38
39
40 typedef struct _EMULATOR_ACCESS_ENTRY {
41 ULONG BasePort;
42 ULONG NumConsecutivePorts;
43 EMULATOR_PORT_ACCESS_TYPE AccessType;
44 UCHAR AccessMode;
45 UCHAR StringSupport;
46 PVOID Routine;
47 } EMULATOR_ACCESS_ENTRY, *PEMULATOR_ACCESS_ENTRY;
48
49 #ifndef VIDEO_ACCESS_RANGE_DEFINED /* also in video.h */
50 #define VIDEO_ACCESS_RANGE_DEFINED
51 typedef struct _VIDEO_ACCESS_RANGE {
52 PHYSICAL_ADDRESS RangeStart;
53 ULONG RangeLength;
54 UCHAR RangeInIoSpace;
55 UCHAR RangeVisible;
56 UCHAR RangeShareable;
57 UCHAR RangePassive;
58 } VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
59 #endif
60
61 typedef VOID
62 (DDKAPI *PBANKED_SECTION_ROUTINE)(
63 IN ULONG ReadBank,
64 IN ULONG WriteBank,
65 IN PVOID Context);
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif /* __MINIPORT_H */