input_dev 结构体成员注释
来源:互联网 发布:网络主播思瑞在线 编辑:程序博客网 时间:2024/04/28 06:57
- Name
- struct input_dev — represents an input device
- Synopsis
- struct input_dev {
- const char * name;//name of the device
- const char * phys;//physical pathto the device in the system hierarchy
- const char * uniq;//unique identification codefor the device (if device has it)
- struct input_id id;//id of the device(struct input_id)
- unsigned long evbit[BITS_TO_LONGS(EV_CNT)];//bitmap of types of events supported by the device(EV_KEY, EV_REL, etc.)
- unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];//bitmap of keys/buttons this device has
- unsigned long relbit[BITS_TO_LONGS(REL_CNT)];//bitmap of relative axesfor the device
- unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];//bitmap of absolute axesfor the device
- unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];//bitmap of miscellaneous events supported by the device
- unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];//bitmap of leds present on the device
- unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];//bitmap of sound effects supported by the device
- unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];//bitmap of force feedback effects supported by the device
- unsigned long swbit[BITS_TO_LONGS(SW_CNT)];//bitmap of switches present on the device
- unsigned int keycodemax;//size of keycode table
- unsigned int keycodesize;//size of elementsin keycode table
- void * keycode;//map of scancodesto keycodes for this device
- /*optional methodto alter current keymap, usedto implement sparse keymaps.
- If not supplied default mechanism will be used*/
- int (* setkeycode)(struct input_dev *dev,int scancode, int keycode);
- /*optional methodto retrieve current keymap.If not supplied default mechanism will be used*/
- int (* getkeycode)(struct input_dev *dev,int scancode, int *keycode);
- struct ff_device * ff;//force feedback structure associated with the deviceif device supports force feedback effects
- unsigned int repeat_key;//stores key code of the last key pressed; usedto implement software autorepeat
- struct timer_list timer;//timerfor software autorepeat
- int sync;//setto 1 when there were no new events since last EV_SYNC
- int abs[ABS_MAX+ 1];//current valuesfor reports from absolute axes
- int rep[REP_MAX+ 1];//current valuesfor autorepeat parameters (delay, rate)
- unsigned long key[BITS_TO_LONGS(KEY_CNT)];//reflects current state of device's keys/buttons
- unsigned long led[BITS_TO_LONGS(LED_CNT)];//reflects current state of device's LEDs
- unsigned long snd[BITS_TO_LONGS(SND_CNT)];//reflects current state of sound effects
- unsigned long sw[BITS_TO_LONGS(SW_CNT)];//reflects current state of device's switches
- int absmax[ABS_MAX+ 1];//maximum valuesfor events coming from absolute axes
- int absmin[ABS_MAX+ 1];//minimum valuesfor events coming from absolute axes
- int absfuzz[ABS_MAX+ 1];//describes noisinessfor axes
- int absflat[ABS_MAX+ 1];//size of the center flat position(used by joydev)
- /*this methodis called when the very first user calls input_open_device.
- The driver must prepare the device to start generating events(start polling
- thread, request an IRQ, submit URB, etc.)*/
- int (* open)(struct input_dev *dev);
- void (* close)(struct input_dev *dev);//this methodis called when the very last user calls input_close_device.
- /*purges the device. Most commonly usedto get rid of force feedback effects
- loaded into the device when disconnecting from it */
- int (* flush)(struct input_dev *dev, struct file*file);
- /*event handlerfor events sent _to_ the device, like EV_LEDor EV_SND.
- The device is expected to carry out the requested action (turn on a LED, play sound, etc.)
- The call is protected by event_lockand must not sleep*/
- int (* event)(struct input_dev *dev, unsignedint type, unsignedint code, int value);
- /*input handle that currently has the device grabbed(via EVIOCGRAB ioctl).
- When a handle grabs a device it becomes sole recipient for all input events coming from the device */
- struct input_handle * grab;
- /*this spinlockis is taken when input core receivesand processes a new event for the device (in input_event). Code that accessesand/or modifies parameters of a device(such as keymap or absmin, absmax, absfuzz, etc.) after device has been registered with input core must take this lock.*/
- spinlock_t event_lock;
- struct mutex mutex; //serializes calls to open, close and flush methods
- /*stores number of users(input handlers) that opened this device. Itis used by input_open_device and input_close_device to make sure that dev->openis only called when the first user opens device and dev->closeis called when the very last user closes the device*/
- unsigned int users;
- int going_away;//marks devices that arein a middle of unregistering and causes input_open_device*() fail with-ENODEV.
- struct device dev; //driver model's view of this device
- struct list_head h_list; //list of input handles associated with the device. When accessing the list dev->mutex must be held
- struct list_head node; //used to place the device onto input_dev_list
- };
- input_dev 结构体成员注释
- input_dev结构体分析
- Input_dev结构体分析
- input_dev结构体分析
- input_dev结构体分析
- input_dev结构体设计
- >Input_dev结构体-事件支持
- task_struck结构体成员注释
- task_struct结构体注释
- 结构体成员排序
- 结构体成员
- 结构体互为成员
- 结构体成员初始化
- FILE结构体成员
- 结构体互为成员
- 在触摸屏驱动中,通常在probe函数中会调用input_set_abs_params给设备的input_dev结构体初始化 ,上报点input_mt_sync(input);
- 结构体成员内存分配原则,结构体
- 访问结构体结构成员的示例
- Linux下插件开发应用案例
- 软件随想录(local.joelonsoftware.com/wiki)-2006年09月01日 语言战争 - Language Wars
- C++中派生类访问基类protected成员的范围
- VC6.0下调用Webservice
- Linux下expect的ssh自动登录脚本
- input_dev 结构体成员注释
- 软件随想录(local.joelonsoftware.com/wiki)-2006年09月12日 再探Ruby效能 - Ruby Performance Revisited
- MyEclipse和Eclipse在使用中的问题
- 【第六章】 AOP 之 6.6 通知参数 ——跟我学spring3
- Difference between GWAS/MAS and GS
- Qt中无法load big image的问题
- 资源
- 浙大PAT_1044:Shopping in Mars 解题报告
- sysbench的安装和使用