| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 176 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 176 Page - STMicroelectronics |
|
176 / 245 page ![]() Human interface device (HID) drivers UM0851 176/245 Doc ID 16604 Rev 2 Figure 47. State machine of touchscreen driver The touchscreen driver is probed as input driver during Linux boot-up. The driver opens the ADC and GPIO channels, and starts reading values from the ADC channels by polling in a 100 ms loop. The polling interval (currently 100 ms) of driver is important because it determines the touchscreen response time. 50 initial readings are performed to estimate a threshold. The touchscreen is considered to be touched (or pressed) only when the values go above the threshold. If the touchscreen is pressed, the driver keeps sending coordinates until the touchscreen is untouched (or released). Touchscreen calibration A CLCD panel touchscreen cannot initially return absolutely correct coordinates, it returns values which need to be adjusted according to the CLCD panel dimensions. For this reason, calibration is required to get the correct coordinates. The driver sends the raw (un- calibrated) coordinates. The application layer is responsible for performing the calibration which can be done using the 'tslib' standard utility 'ts_calibrate'. Touchscreen driver interface to input layer In the _init function, which is called either when the module is loaded or when booting the kernel, the touchscreen driver grabs the required resources. Then it allocates a new input device structure with input_allocate_device () and sets up input bitfields. In this way the device driver tells the other parts of the input systems what it is and what events can be generated or accepted by this input device. The touchscreen driver enables the Touch and X-Y coordinate information to send to the user application via the input device. input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); Then the driver registers the input device structure by calling input_register_device (). struct input_dev *input; input_register_device( input ); Registration of the device adds the 'input' structure to the linked lists of the input driver and calls the modules _connect functions in the device handler to tell them that a new input IDLE RELEASE Initial default state Returns to IDLE state from RELEASE state after finger is removed RELEASE state is entered when finger is removed from panel. Sends an event and changes state to IDLE PRESS PRESS state is entered when panel is touched. Remains in same state when touched and sends event again and again |
|
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 |