View Single Post
Old 06-09-2011, 03:14 PM   #27
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Quote:
Originally Posted by mark03 View Post
Any idea if there are C/C++ examples showing the use of those ioctls? I'm intrigued by the various refresh types, flashing vs nonflashing (?), etc. I wonder if the energy consumption scales linearly with the update area size, or if it also depends on the number of black-to-white or white-to-black pixel transitions within that area.
I've attached the code I've written as a gfxdriver for Qt embedded. Grep for the ioctls. But note that I'm only using a single one of them: the fast (but a bit dirty) refresh of rectangular areas. The driver in the kernel seems to be a bit more sophisticated but I didn't come across other code that uses it yet.

BTW, the code expects the kernel eink header file in the compiler's search path (see the include section in the gfxdriver).

Quote:
I'm thinking of writing a bike-computer app for my Kindle. I just need to get a reed switch wired to a keyboard key or side button. How hard could it be...
Well, I'm more in the software side of things :-) But it should be feasible, I think. The buttons generate regular linux input events (which, BTW, is why no special keyboard driver is needed for Qt embedded, just a special keymap).
hawhill is offline   Reply With Quote