Lines Matching refs:gameport

2 Programming gameport drivers
5 A basic classic gameport
8 If the gameport doesn't provide more than the inb()/outb() functionality,
11 struct gameport gameport;
13 gameport.io = MY_IO_ADDRESS;
14 gameport_register_port(&gameport);
16 Make sure struct gameport is initialized to 0 in all other fields. The
17 gameport generic code will take care of the rest.
27 If your hardware supports a gameport address that is not mapped to ISA io
31 gameport. Although only one ioport is really used, the gameport usually
34 Please also consider enabling the gameport on the card in the ->open()
41 Memory mapped gameport
44 When a gameport can be accessed through MMIO, this way is preferred, because
45 it is faster, allowing more reads per second. Registering such a gameport
48 struct gameport gameport;
50 void my_trigger(struct gameport *gameport)
55 unsigned char my_read(struct gameport *gameport)
60 gameport.read = my_read;
61 gameport.trigger = my_trigger;
62 gameport_register_port(&gameport);
66 Cooked mode gameport
71 the gameport. To register a cooked gameport::
73 struct gameport gameport;
75 int my_cooked_read(struct gameport *gameport, int *axes, int *buttons)
84 int my_open(struct gameport *gameport, int mode)
89 gameport.cooked_read = my_cooked_read;
90 gameport.open = my_open;
91 gameport.fuzz = 8;
92 gameport_register_port(&gameport);
107 more than one gameport instance simultaneously, use the ->private member of
108 the gameport struct to point to your data.
110 Unregistering a gameport
115 gameport_unregister_port(&gameport);
117 The gameport structure
123 match what's there at include/linux/gameport.h.
127 struct gameport {
131 A private pointer for free use in the gameport driver. (Not the joystick
138 Number assigned to the gameport when registered. Informational purpose only.
145 to some value if your gameport supports raw mode.
151 Raw mode speed of the gameport reads in thousands of reads per second.
157 If the gameport supports cooked mode, this should be set to a value that
163 void (*trigger)(struct gameport *);
170 unsigned char (*read)(struct gameport *);
177 int (*cooked_read)(struct gameport *, int *axes, int *buttons);
179 If the gameport supports cooked mode, it should point this to its cooked
185 int (*calibrate)(struct gameport *, int *axes, int *max);
196 int (*open)(struct gameport *, int mode);
201 here. Prior to this call, other fields of the gameport struct (namely the io
206 void (*close)(struct gameport *);
209 gameport.
214 struct gameport *next;
216 For internal use by the gameport layer.