views:

148

answers:

3

Is there any documentation on how to write software that uses the framebuffer device in Linux? I've seen a couple simple examples that basically say: "open it, mmap it, write pixels to mapped area." But no comprehensive documentation on how to use the different IOCTLS for it anything. I've seen references to "panning" and other capabilities but "googling it" gives way too many hits of useless information.

Edit: Is the only documentation from a programming standpoint, not a "User's howto configure your system to use the fb," documentation the code?

A: 

The source to any splash screen (i.e. during booting) should give you a good start.

Tim Post
That's a bit general, could ya give me a more specific direction to look?
NoMoreZealots
+1  A: 

You could have a look at fbi's source code, an image viewer which uses the linux framebuffer. You can get it here : http://linux.bytesex.org/fbida/

kbok
+1  A: 

Look at source code of any of: fbxat,fbida, fbterm, fbtv, directFB library, libxineliboutput-fbe, ppmtofb, xserver-fbdev all are debian packages apps. Just apt-get source from debian libraries. there are many others...

hint: search for framebuffer in package description using your favorite package manager.

ok, even if reading the code is sometimes called "Guru documentation" it can be a bit too much to actually do it.

kriss
For something like this where everybody and there brother is writing there own version the problem is the behaviour from one to the next may not be the same if there is no documentation to guide developers through implementing the API. I was looking at the source for the PS3 Linux implementation, you can see there are features which appear to be commonly implemented which they ignored.
NoMoreZealots
@NoMoreZealots: Yes, a true documentation with best practice guidelines would be a very good thing. I really don't know one (so I upvoted your question), my answer was a kind of joke ;-) You may have to write that one...
kriss