On Sat, Mar 10, 2012 at 11:01 PM, Thomas Martitz <ku...@rockbox.org> wrote: > Am 10.03.2012 22:55, schrieb Michael Sparmann: > >> On the other hand this might be responsible for quite a bit of CPU load. >> Let's say 300us every 10ms, that's a whopping 3% of CPU load for the hold >> switch polling alone! Does it really need to be done that often? Might cause >> quite some battery drain. > > > > That's why I'd vote for offloading to a thread, which can run at a much > lower rate.
Polling inside the IRQ handler is not a solution for the reasons Michael is pointing, after a quick look at the async I2C code my first thinking is it can be implemented easily for the Classic and seems it could work, but need to look at the code deeply.