Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 26 Sep 2007 02:33 AM by  jdr
Touchscreen
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages
fszczerba
New Member
New Member
Posts:


--
29 Aug 2007 11:20 PM
    Does anyone have the touchscreen working under Linux? I have the driver loading successfully, but no events ever show up.

    I was poking through the schematics, and I see that there is an unpopulated short (RS2) in the LCD_HSYNC/HRLP single before the PMIC's ADTRIG input. Should this be populated to get the touch screen working?

    I'm using the Logic 10.1" VGA display kit.
    Badguy
    New Member
    New Member
    Posts:


    --
    04 Sep 2007 03:43 PM
    fszczerba:

    I added event debugging to the kernel build, and you can then find the event's
    in dmesg, however you can see then that no device node is created.

    Edit:
    when I call udevtrigger it sets up an appropriate device node.
    trying the mknod only left me with incorrect events.
    paulc@logicpd.com
    New Member
    New Member
    Posts:


    --
    20 Sep 2007 06:07 PM
    ADTRIG input resistor doesn't need to be there for touchscreen to work. You can verify that the touchscreen works by running a prebuilt WinCE image available from the Logic website.
    jdr
    New Member
    New Member
    Posts:


    --
    21 Sep 2007 06:53 AM
    Hi,

    I applied the patch posted here from caiaq.org and the SPI patch. After that,
    the touchscreen driver worked just fine.

    If I could get anything like xorg working I could tell if the events are useable.
    Did anyone make xorg to work either with fbdev or v4l driver ?

    Best Regards,
    jdr
    fszczerba
    New Member
    New Member
    Posts:


    --
    21 Sep 2007 08:29 AM
    I was using the qtopia build from ltib. It works (sort of) with the mouse (you can't use the menus, the mouse move events seem to make it think you are tapping with the stylus).

    I haven't had time to look at this much since my last post, so no useful updates on my end.
    Badguy
    New Member
    New Member
    Posts:


    --
    25 Sep 2007 12:30 PM
    I see, we are trying to get the touch to support Qtopia.

    I disabled Qtopia right away. so sorry.

    but the touch screen works fine

    udevtrigger was all I needed to create the valid event[N] device node

    I wrote a simple driver here to parse the events, and I am now using that for directfb as well.
    the directfb handler seems to lose some events, and with a relative coord system that was unacceptable.
    jdr
    New Member
    New Member
    Posts:


    --
    26 Sep 2007 02:33 AM
    See my post on the Xorg thread. There you will find the required code
    in order to add calibration to the mxc_ts driver.

    AFAIK the mxc_ts driver does only generate absolute coordinates events.
    So there should not be any problem in regard to relative events being lost.
    But you will need to modify the driver in order to calibrate it. The device
    has a rather huge offset and scaling error which needs to be compensated.

    See below an example. I used that program in order to determine the
    max/min x and y coordinates. After passing those values to the modified
    mxc_ts module it worked just fine for me, even under Xorg.

    #include <stdio.h>
    #include <sys/time.h>
    #include <linux/input.h>


    int main(int argc, char **argv)
    {
    int fd, n;
    struct input_event event;
    int x = 0, y = 0, pendown = 0;

    fd = open("/dev/input/event0", 0);
    do {
    n = read(fd, &event, sizeof(event));
    if (event.type == EV_ABS)
    {
    if (event.code == ABS_X)
    {
    x = event.value;
    }
    if (event.code == ABS_Y)
    {
    y = event.value;
    }
    if (event.code == ABS_PRESSURE)
    {
    pendown = event.value;
    }
    fprintf(stderr, "x=%d y=%d - %d\n", x, y, pendown);
    }
    } while (n>=0);

    close(fd);
    return 0;
    }

    Best Regards,
    jdr
    You are not authorized to post a reply.