I'm porting Android on an imx51 for a new touchscreen.
I know Android use the touchscreen like an input device but I don't
know what are the values it wants? (X,Y,...) What is the unit? (pixel,
mm...)
Do you know which part of Android read the event file (dev/input/
event) of the touchscreen?
Where can I find a documentattion on this item?
Best regards,
Arnaud Frigout
It will be (x,y) co-ordinates, where (0,0) being the top-left of the
screen and (max-x, max-y) being the bottom of the screen.
how it works:
- when user taps touch screen, it generates an interrupt and its the
trigger for touch screen driver to read the (x,y) co-ordinate from
touch-screen controller.
touch screen controller returns samples that its h/w calculated. (can
be resistive/capacitive).
Once, x,y coordinates are ready, driver publishes using input_report_abs calls.
its still a black box for me, how OS takes (x,y) from this user event,
maps to a framebuffer locaiton, and do some stuff..
u can refer a sample touch screen driver at
http://git.omapzoom.org/?p=kernel/omap.git;a=blob;f=drivers/input/touchscreen/tsc2007.c
>> Do you know which part of Android read the event file (dev/input/event) of the touchscreen?
EventHub.., "Grand Central Station for events" - as called by android team ;P
./frameworks/base/libs/ui/EventHub.cpp
Link - http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=libs/ui/EventHub.cpp
> --
> unsubscribe: android-porti...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>
> To unsubscribe, reply using "remove me" as the subject.
>
Thanks for the quick reply.
Deva R :
The driver reports BTN_TOUCH, ABS_X, ABS_Y and ABS_PRESSURE.
I know that BTN_TOUCH, ABS_X, ABS_Y must be reported for Android but
is it obligatory for ABS_PRESSURE ?
What's happen if i don't use the PRESSURE?
On the screen in the landscape mode where are X,Y ?
is it like this?
Y<----------------O
|
|
|
V
X
Dianne Hackborn :
What are the minimum and the maximum accepted by Android? (-32 768 à
32 767)
Does Android have an unit for the touchscreen like for the
accelerometer?
Thank you.
Best Regards,
Arnaud Frigout
> The driver reports BTN_TOUCH, ABS_X, ABS_Y and ABS_PRESSURE.
> I know that BTN_TOUCH, ABS_X, ABS_Y must be reported for Android but
> is it obligatory for ABS_PRESSURE ?
> What's happen if i don't use the PRESSURE?
you can see few drivers in <kernel>/drivers/input updating just ABS_X,
ABS_Y, but not ABS_PRESSURE..
I'm not sure of usage of pressure parameter in kernel, it should be optional..
> On the screen in the landscape mode where are X,Y ?
> is it like this?
> Y<----------------O
> |
> |
> |
> V
> X
In platforms i've seen, touchscreen always should give absolute
physical co-ordinates w.r.t panel.
its the job of OS (window server) to process it based on what mode it
currently it is (landscape or portrait mode)..
Do you know what are the minimum and the maximum accepted by Android?
(min=0?)
Is it 16 bits or 32bits?
Thanks you,
Best Regards,
Arnaud Frigout