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



Rockbox mail archive

Subject: Classic holdswitch polling

Classic holdswitch polling

From: Cástor Muñoz <cmvidal_at_gmail.com>
Date: Sun, 4 Mar 2012 23:19:47 +0100

HI, need help for a final solution for FS#12520, i am trying to detect
the holdswitch state using PMU interrupts but no luck so far, i also
want to look to the GPIO ports one more time but i am not very
optimist.

If finally the PMU polling is needed to detect the holdswitch state,
what do you think is the best solution?, without rewriting a lot of
code there are mainly two ways:

a) Put PMU polling into a critical section and continue polling from
irq handler. The delay for some i2c operations (i2c_read(date)) is
relatively high so i think this is not the best solution, but its easy
and probably it will work.

b) To get PMU polling out of the interrupt handler. For me this is a
better solution, its a minor change but there is no obvious place to
do it, actually it is managed on the tick interrupt for all targets.
The powermgmt thread doesn't seems to be an appropriate place, but
creating a new thread only for this target looks wasteful, maybe the
backlight thread or the misc event handler? .

I think the PMU polling crashes should be fixed as soon as possible,
some of the crashes are very annoying, also it will allow to include
the CPU scaling patch which seems stable.
Received on 2012-03-04


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa