public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Rutger Hofman <rutger@cs.vu.nl>
To: eCos Developer list <ecos-devel@ecos.sourceware.org>
Subject: Re: [ECOS] synth framebuffer and touchscreen emulation
Date: Fri, 23 Jul 2010 09:16:00 -0000	[thread overview]
Message-ID: <4C495F5C.7020405@cs.vu.nl> (raw)
In-Reply-To: <4C420F15.1050508@cs.vu.nl>

[moved this from 'discuss' to 'devel']

Rutger Hofman wrote:
> Rutger Hofman wrote:
>> our board will have a TFT screen with touchscreen. I want to develop 
>> higher-level software using the synthetic target, and I succeeded in 
>> drawing images on the synthetic frame buffer window. So far so good.
>>
>> However, I also want to add touchscreen emulation: the mouse should 
>> generate synthetic touchscreen events. Two questions:
>>
>>  1) When I try to enable mouse awareness

I handle mouse events in framebuf.tcl by registering mouse event callbacks.

>>  2) What is the preferred way to create a synthetic touchscreen
>>     driver? It must necessarily be integrated into the framebuffer
>>     driver, because that one owns the X stuff. I wonder about
>>     integration in the synthetic communication between target,
>>     framebuffer and auxiliary.

I made a separate package dev/touch/synth for the synthetic target 
(implemented as a char device driver). It is necessarily tightly 
integrated with the synthetic framebuffer, because the framebuffer 
host-side catches the X mouse events. So, framebuf.tcl now installs 
mouse action handlers, queries its tdf file for option ("framebuffer" 
"touchscreen") == "on", and if so, installs an interrupt for the 
touchscreen device. framebuf.tcl mouse event callbacks generate an 
interrupt in the target; the target touchscreen driver then 
synth_auxiliary_xchgmsg()s with framebuf.tcl to get the mouse event 
parameters.

The target .ecc must include+enable the synthetic touchscreen package, 
and the framebuffer that wishes to use a touchscreen must set a .cdl 
value CYGPKG_DEVS_FRAMEBUF_SYNTH_FBx_TOUCHSCREEN in the target .ecc.

Two questions:

1) Is there a way around this two-step configuration? If one wants a 
touchscreen, one must tell so in the .tdf file to notify host-side 
framebuffer.tcl, and one must tell so in the target .ecc to notify the 
framebuffer driver. E.g., it would be nice if the host side could detect 
CYGPKG_DEVS_FRAMEBUF_SYNTH_FBx_TOUCHSCREEN in the target configuration.

2) There are just two (now three) touchscreen device drivers in eCos, 
and they all define the same device driver API: a touchscreen event is 
described by a struct with 4 shorts (type, x, y, _unused). Isn't it time 
to lift this into a package io/touchscreen that actually prescribes this 
API? Then touchscreen code would become portable across touchscreen devices.

Rutger

           reply	other threads:[~2010-07-23  9:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4C420F15.1050508@cs.vu.nl>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C495F5C.7020405@cs.vu.nl \
    --to=rutger@cs.vu.nl \
    --cc=ecos-devel@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).