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
122 struct gameport {
126 A private pointer for free use in the gameport driver. (Not the joystick
140 gameport's physical name/description as set by driver calling gameport_set_phys().
148 to some value if your gameport supports raw mode.
154 Raw mode speed of the gameport reads in thousands of reads per second.
160 If the gameport supports cooked mode, this should be set to a value that
166 void (*trigger)(struct gameport *);
173 unsigned char (*read)(struct gameport *);
180 int (*cooked_read)(struct gameport *, int *axes, int *buttons);
182 If the gameport supports cooked mode, it should point this to its cooked
188 int (*calibrate)(struct gameport *, int *axes, int *max);
199 int (*open)(struct gameport *, int mode);
204 here. Prior to this call, other fields of the gameport struct (namely the io
209 void (*close)(struct gameport *);
212 gameport.
220 void (*poll_handler)(struct gameport *);
221 struct gameport *parent, *child;
227 For internal use by the gameport layer.