source: GPL/include/osspci.h@ 18

Last change on this file since 18 was 18, checked in by vladest, 20 years ago

initial import

File size: 2.2 KB
Line 
1/* $Id: osspci.h,v 1.1.1.1 2003/07/02 13:56:58 eleph Exp $ */
2/*
3 * Header for OSS PCI definitions
4 *
5 * (C) 2000-2002 InnoTek Systemberatung GmbH
6 * (C) 2000-2001 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
21 * USA.
22 *
23 */
24
25#ifndef __OSSPCI_H__
26#define __OSSPCI_H__
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#define MAX_RES_IRQ 2
33#define MAX_RES_DMA 2
34#define MAX_RES_IO 8
35#define MAX_RES_MEM 8
36
37#define RM_PNP_DEVICE 0
38#define RM_PCI_DEVICE 1
39
40#define MAX_PCI_DEVICES 16
41#define MAX_PCI_BUSSES 16
42
43 //#pragma pack(4) !!! by vladest
44#pragma pack(1)
45
46typedef struct
47{
48 ULONG busnr;
49 ULONG devnr;
50 ULONG funcnr;
51 ULONG devfn;
52 USHORT irq[MAX_RES_IRQ];
53 USHORT dma[MAX_RES_DMA];
54 USHORT io[MAX_RES_IO];
55 USHORT iolength[MAX_RES_IO];
56 ULONG mem[MAX_RES_MEM];
57 ULONG memlength[MAX_RES_MEM];
58} IDC_RESOURCE;
59
60#pragma pack()
61
62typedef ULONG HRESMGR;
63
64HRESMGR RMFindPCIDevice(ULONG vendorid, ULONG deviceid, IDC_RESOURCE *lpResource, int idx);
65BOOL RMRequestIO(HRESMGR hResMgr, ULONG ulIOBase, ULONG ulIOLength);
66BOOL RMRequestMem(HRESMGR hResMgr, ULONG ulMemBase, ULONG ulMemLength);
67BOOL RMRequestIRQ(HRESMGR hResMgr, ULONG ulIrq, BOOL fShared);
68BOOL RMRequestDMA(HRESMGR hResMgr, ULONG ulDMA);
69//register resources & destroy resource manager object
70void RMFinialize(HRESMGR hResMgr);
71//destroy resource manager object
72void RMDestroy(HRESMGR hResMgr);
73
74extern HRESMGR hResMgr;
75
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif
Note: See TracBrowser for help on using the repository browser.