| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 177 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 177 Page - STMicroelectronics |
|
177 / 245 page ![]() UM0851 Human interface device (HID) drivers Doc ID 16604 Rev 2 177/245 device has appeared. Input_register_device () may sleep and therefore must not be called from an interrupt or with a spinlock held. When a press occurs on the panel-screen, the driver reports it via the input_report_key () call to the input system. The value is interpreted as a truth value: any nonzero value means key pressed, zero value means key released. The input code generates events only if the value is different from the previous one. Coordinates are reported using the input_report_abs () call. The input_sync () call can be used to tell those who receive the events that we've sent a complete report. This may not seem important in the one button case, but is quite important for example for mouse movement, where you do not want the X and Y values to be interpreted separately, because that would result in a different movement. 7.1.4 Touchscreen usage The touchscreen driver provides an event interface to the input layer. Evdev is the generic input event interface. It passes the events generated in the kernel straight to the program, with timestamps. The devices are in '/dev/input' normally up to event 31. crw-r--r-- 1 root root 13, 64 Apr 1 10:49 event0 crw-r--r-- 1 root root 13, 65 Apr 1 10:50 event1 crw-r--r-- 1 root root 13, 66 Apr 1 10:50 event2 crw-r--r-- 1 root root 13, 67 Apr 1 10:50 event3 ... For the touchscreen, the device name is '/dev/input/event0' (or '/dev/input/ts') with major 13 and minor 64. The device can be opened using using the open() system call in both blocking and non-blocking modes. It can be read using the select() system call on the /dev/input/eventX devices, which will always get a whole number of input events on a read. Their layout is: struct input_event { struct timeval time; unsigned short type; unsigned short code; unsigned int value; }; 'time' is the timestamp, it returns the time at which the event happened. ‘type’ is, for example, EV_REL for relative moment or REL_KEY for a keypress or release. 'code' is the event code, for example REL_X or KEY_BACKSPACE. 'value' is the value carried by the event. If you are using the touchscreen over Xserver then just providing the device name is enough. Table 46. Configuration options Configuration option Comment CONFIG_INPUT_EVDEV This option make input device events be accessible under char device 13:64+ - /dev/input/eventX in a generic way CONFIG_INPUT_TOUCHSCREEN This option enables the touchscreen device |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |