xref: /haiku/src/add-ons/kernel/drivers/joystick/emuxkigameport/driver.h (revision 0996e64efde0ae4712d37ea44158f9fa364874f6)
1 /*
2  * Copyright 2008 Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Alexander Coers		Alexander.Coers@gmx.de
7  *		Fredrik Modéen 		fredrik@modeen.se
8  */
9 
10 #ifndef DRIVER_H
11 #define DRIVER_H
12 
13 #include <KernelExport.h>
14 #include <PCI.h>
15 
16 #include "joystick_driver.h"
17 
18 #define VENDOR_ID_CREATIVE 0x1102
19 #define DEVICE_ID_CREATIVE_EMU10K1 0x0002
20 #define SBLIVE_ID 0x7002 /*EMU10000*/
21 #define AUDIGY_ID 0x7003 /*EMU10K2*/
22 #define SBLIVE_DELL_ID 0x7004 /*	Game port for SB Live!, Dell OEM gameport*/
23 #define DRIVER_NAME "emuxkigameport"
24 #define	AREA_NAME	"SB_GAME"
25 #define MAX_CARDS 2
26 
27 /* NB global variables are valid only while driver is loaded */
28 static volatile ulong vaddr; /* PCI */
29 
30 // use pci manager
31 static char pci_name[] = B_PCI_MODULE_NAME;
32 static pci_module_info *pci;
33 
34 //  use generic_gameport_module...
35 static char gameport_name [] = "generic/gameport/v2";
36 static generic_gameport_module *gameport;
37 
38 #define HCFG	0x14		/* Hardware Configuration Register of SB-Live */
39 #define HCFG_JOYENABLE		0x00000200	/* Mask for enabling Joystick */
40 
41 struct joystick_dev {
42 	void *		driver;
43 	char		name1[64];
44 };
45 
46 struct gameport_info {
47 	char			name[60];	/* used for resources */
48 	pci_info		info;
49 	joystick_dev	joy;
50 };
51 
52 #endif	/*	DRIVER_H	*/
53