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: Classic holdswitch polling

Re: Classic holdswitch polling

From: Cástor Muñoz <cmvidal_at_gmail.com>
Date: Thu, 15 Mar 2012 22:07:04 +0100

I had some time to give my last try to the GPIO holdwitch detection, i
tried it before so was not much optimist but i knew other similar
iPods are reflecting holdswitch status on GPIO ports. Finally found
it! :)

This was a nice thread, i learned many new things about rockbox code,
these are my actual thoughts:

Polling inside interrupts and create a thread for all targets are
discarded due to the reasons already exposed.

The async polling is probably the most efficient way but will result
on a somewhat intricate code, i think it is still valid for this issue
and was ready to try to implement it (if no objections).

But the async polling is not appropriate for a more complex task (i.e
reading and ADC), creating a specific target thread is more simple and
flexible for future use, not as efficient as the ASYNC poll but the
overhead for the Classic is very low, it could be also a valid option.
Received on 2012-03-15

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