Lines Matching +full:wait +full:- +full:state
1 .. _joystick-api:
7 :Author: Ragnar Hojland Espinosa <ragnar@macula.net> - 7 Aug 1998
18 driver now reports only any changes of its state. See joystick-api.txt,
35 (JS_EVENT_INIT) that you can read to obtain the initial state of the
65 -------------
71 #define JS_EVENT_INIT 0x80 /* initial state of device */
86 ---------------
108 --------------
110 For an axis, ``value`` is a signed integer between -32767 and +32767
141 -------------
153 wait) forever until an event is generated and effectively read. There
154 are two alternatives if you can't afford to wait forever (which is,
157 a) use select to wait until there's data to be read on fd, or
161 b) open the device in non-blocking mode (O_NONBLOCK)
165 ----------
167 If read returns -1 when reading in O_NONBLOCK mode, this isn't
170 all events on the queue (that is, until you get a -1).
202 the actual state of the joystick.
219 In this case, read would return -1 if the queue was empty, or some
245 -------------
247 JSIOGCVERSION is a good way to check in run-time whether the running
249 IOCTL will fail. For a compile-time decision, you can test the
257 ----------
259 JSIOCGNAME(len) allows you to get the name string of the joystick - the same
271 -------------
311 with the actual state of the joystick::
314 int buttons; /* immediate button state */
323 To test the state of the buttons,
331 except that the values are non-negative. The 1.2.8+ drivers use a