View Single Post
Old 10-14-2018, 03:43 AM   #6
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
A simple blocking read of the touch event file seems to do the trick just fine. No need for any polling, and Nickel is happy to keep processing touch events while doing so.

The test program doesn't even register in 'top', so hopefully this approach wouldn't be a battery hog.

Oh, and I've basically created a simple C touch "driver" that applications can integrate if they so desire (I ported my Go code to C). It needs a bit of tidying up before release however, and I'm not sure if I've accounted for all the different "protocols" correctly.
sherman is offline   Reply With Quote