Alan Stern schrieb:
> On Thu, 15 Feb 2007, Sven Anders wrote:
>
>> I tried to stop resubmitting (by NOT calling "usb_submit_urb" again) and I
>> hoped the the interrupt handler will continue when the touchpad is pressed
>> again, but it does not work.
>
>> A longer interval would solve it in some way:
>> I could get constantly new temperature update (each second or more) and if
>> the touchpad is touch, I can reduce the interval to the normal settings.
>
> It sounds like your completion handler should not call usb_submit_urb().
>
> Instead you should use a kernel timer. When the timer expires, its
> callback routine should call usb_submit_urb(). The callback should also
> determine whether the touchpad is being pressed, use that information to
> decide how long the next timer interval will be, and restart the timer.
Some idea I had myself.
Is it possible to use a mix? My idea is as follows:
Variant 1:
If the completion handler decides, that there is no finger on the touchpad
any more, it does not call usb_submit_urb() again. The completion handler
stops. Via an kernel timer I will call the completion handler to test, if
there is a finger on the touchpad again. If so, I will restart the interrupt
handler and will call usb_submit_urb() until I have no finger on the pad
again.
Variant 2:
If the is no finger on the touchpad, I will make the interval longer until
I have a finger on the pad again...
For variant 2 I want to know, if it is sufficent to set the 'interval'
variable in the urb struct to a new value or do I have to call a function?!
Regards
Sven
--
Sven Anders <[EMAIL PROTECTED]> () Ascii Ribbon Campaign
/\ Support plain text e-mail
ANDURAS service solutions AG
Innstra?e 71 - 94036 Passau - Germany
Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55
Rechtsform: Aktiengesellschaft - Sitz: Passau - Amtsgericht Passau HRB 6032
Mitglieder des Vorstands: Sven Anders, Marcus Junker
Vorsitzender des Aufsichtsrats: Dipl. Kfm. Thomas Tra"ger
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel