Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: kugel: r21177 - trunk/firmware/target/arm/as3525

Re: kugel: r21177 - trunk/firmware/target/arm/as3525

From: Thomas Martitz <thomas.martitz_at_student.htw-berlin.de>
Date: Wed, 03 Jun 2009 18:02:43 +0200

Rafaël Carré schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Le Wed, 3 Jun 2009 13:35:56 +0200,
> mailer_at_svn.rockbox.org a écrit :
>
>
>> Date: 2009-06-03 13:35:56 +0200 (Wed, 03 Jun 2009)
>> New Revision: 21177
>>
>> Log Message:
>> Change the timer interrupt setup so that TIMER_FREQ is changed for
>> HAVE_SCROLLWHEEL (which read the scrollwheel between tick tasks too)
>> instead of the generated variable. No functional change.
>>
>
> There is a problem in this code (not with the change):
>
> INT_TIMER2() will be called twice per tick, and the described behaviour
> is
>
> interrupt 2*n : call_tick_tasks() ; button_read_dbop();
> interrupt 2*n+1 : button_read_dbop(); /* 2 calls per tick */
>
> But the actual behaviour is:
>
> interrupt 2*n : call_tick_tasks() ;
> interrupt 2*n+1 : button_read_dbop(); /* 1 call per tick */
>
> So if the wheel is smooth enough, the code should be simplified and run
> button_read_dbop() at the same time than call_tick_tasks(), by using
> kernel.c tick_add_task()
>
button_read_dbop() is called in a tick_task too (in button_read_device()
). That, and the explicit call in the timer ISR make 2 calls per tick.

Best regards.
Received on 2009-06-03

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy