Lines Matching +full:len +full:- +full:or +full:- +full:define
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Copyright (c) 1999-2002 Vojtech Pavlik
5 * This program is free software; you can redistribute it and/or modify it
10 #define _UAPI_INPUT_H
20 #include "input-event-codes.h"
31 #define input_event_sec time.tv_sec
32 #define input_event_usec time.tv_usec
41 #define input_event_sec __sec
42 #define input_event_usec __usec
53 #define EV_VERSION 0x010001
56 * IOCTLs (0x00 - 0x7f)
67 * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls
103 * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls
104 * @scancode: scancode represented in machine-endian form.
105 * @len: length of the scancode that resides in @scancode buffer.
113 * option of performing lookup either by @scancode itself or by @index
114 * in keymap entry. EVIOCGKEYCODE will also return scancode or index
118 #define INPUT_KEYMAP_BY_INDEX (1 << 0)
120 __u8 len; member
132 #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */
133 #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */
134 #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */
135 #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */
137 #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */
138 #define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry)
139 #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */
140 #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry)
142 #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ argument
143 #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ argument
144 #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ argument
145 #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ argument
148 * EVIOCGMTSLOTS(len) - get MT slot values
149 * @len: size of the data buffer in bytes
160 * The ioctl size argument (len) is the size of the buffer, which
161 * should satisfy len = (num_slots + 1) * sizeof(__s32). If len is
169 * If the request code is not an ABS_MT value, -EINVAL is returned.
171 #define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) argument
173 #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ argument
174 #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ argument
175 #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ argument
176 #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ argument
178 #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ argument
179 #define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */
180 #define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */
182 #define EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback devi…
183 #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */
184 #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time…
186 #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */
187 #define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */
190 * EVIOCGMASK - Retrieve current event mask
197 * The event mask is a per-client mask that specifies which events are
208 * event type or if the receive buffer is larger than the number of
215 * if the receive-buffer points to invalid memory, or EINVAL if the kernel
218 #define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */
221 * EVIOCSMASK - Set event mask
225 * type. See EVIOCGMASK for a description of event-masks and the
226 * argument-type.
229 * is unknown to the kernel, or if the number of event codes specified in
234 * all known event-codes, all remaining codes are automatically cleared and
238 * returned if the receive-buffer points to invalid memory. EINVAL is returned
241 #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */
243 #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */
249 #define ID_BUS 0
250 #define ID_VENDOR 1
251 #define ID_PRODUCT 2
252 #define ID_VERSION 3
254 #define BUS_PCI 0x01
255 #define BUS_ISAPNP 0x02
256 #define BUS_USB 0x03
257 #define BUS_HIL 0x04
258 #define BUS_BLUETOOTH 0x05
259 #define BUS_VIRTUAL 0x06
261 #define BUS_ISA 0x10
262 #define BUS_I8042 0x11
263 #define BUS_XTKBD 0x12
264 #define BUS_RS232 0x13
265 #define BUS_GAMEPORT 0x14
266 #define BUS_PARPORT 0x15
267 #define BUS_AMIGA 0x16
268 #define BUS_ADB 0x17
269 #define BUS_I2C 0x18
270 #define BUS_HOST 0x19
271 #define BUS_GSC 0x1A
272 #define BUS_ATARI 0x1B
273 #define BUS_SPI 0x1C
274 #define BUS_RMI 0x1D
275 #define BUS_CEC 0x1E
276 #define BUS_INTEL_ISHTP 0x1F
277 #define BUS_AMD_SFH 0x20
282 #define MT_TOOL_FINGER 0x00
283 #define MT_TOOL_PEN 0x01
284 #define MT_TOOL_PALM 0x02
285 #define MT_TOOL_DIAL 0x0a
286 #define MT_TOOL_MAX 0x0f
289 * Values describing the status of a force-feedback effect
291 #define FF_STATUS_STOPPED 0x00
292 #define FF_STATUS_PLAYING 0x01
293 #define FF_STATUS_MAX 0x01
306 * struct ff_replay - defines scheduling of the force-feedback effect
316 * struct ff_trigger - defines what triggers the force-feedback effect
318 * @interval: controls how soon the effect can be re-triggered
326 * struct ff_envelope - generic force-feedback effect envelope
333 * envelope force-feedback core will convert to positive/negative
335 * Valid range for the attack and fade levels is 0x0000 - 0x7fff
345 * struct ff_constant_effect - defines parameters of a constant force-feedback effect
355 * struct ff_ramp_effect - defines parameters of a ramp force-feedback effect
367 * struct ff_condition_effect - defines a spring or friction force-feedback effect
388 * struct ff_periodic_effect - defines parameters of a periodic force-feedback effect
398 * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP,
419 * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect
432 * struct ff_effect - defines force feedback effect
434 * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM)
439 * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect,
444 * To create a new effect application should set its @id to -1; the kernel
445 * will return assigned @id which can later be used to update or delete
449 * 0 deg -> 0x0000 (down)
450 * 90 deg -> 0x4000 (left)
451 * 180 deg -> 0x8000 (up)
452 * 270 deg -> 0xC000 (right)
474 #define FF_RUMBLE 0x50
475 #define FF_PERIODIC 0x51
476 #define FF_CONSTANT 0x52
477 #define FF_SPRING 0x53
478 #define FF_FRICTION 0x54
479 #define FF_DAMPER 0x55
480 #define FF_INERTIA 0x56
481 #define FF_RAMP 0x57
483 #define FF_EFFECT_MIN FF_RUMBLE
484 #define FF_EFFECT_MAX FF_RAMP
490 #define FF_SQUARE 0x58
491 #define FF_TRIANGLE 0x59
492 #define FF_SINE 0x5a
493 #define FF_SAW_UP 0x5b
494 #define FF_SAW_DOWN 0x5c
495 #define FF_CUSTOM 0x5d
497 #define FF_WAVEFORM_MIN FF_SQUARE
498 #define FF_WAVEFORM_MAX FF_CUSTOM
504 #define FF_GAIN 0x60
505 #define FF_AUTOCENTER 0x61
508 * ff->playback(effect_id = FF_GAIN) is the first effect_id to
509 * cause a collision with another ff method, in this case ff->set_gain().
510 * Therefore the greatest safe value for effect_id is FF_GAIN - 1,
513 #define FF_MAX_EFFECTS FF_GAIN
515 #define FF_MAX 0x7f
516 #define FF_CNT (FF_MAX+1)