I am using an embedded system and built an excellent GUI application based on
SDL with framebuffer. While the input of the system are buttons which generate
different values from 2 GPIO ports, say, when pressed button 1 will give value
"1" to the GPIO port.
I can get this GPIO value very easily by a self made character kernel module and
read it from my application, but this breaks the architecture of using SDL
library.
I want to make the input more ‘generic’, searched in google and seems no one
tried similar thing before. Was anyone did anything with GPIO as input for use
with SDL library?
dbp wrote:
| I am using an embedded system and built an excellent GUI application
based on
| SDL with framebuffer. While the input of the system are buttons which
generate
| different values from 2 GPIO ports, say, when pressed button 1 will
give value
| “1” to the GPIO port.
|
| I can get this GPIO value very easily by a self made character kernel
module and
| read it from my application, but this breaks the architecture of using SDL
| library.
|
| I want to make the input more ‘generic’, searched in google and seems
no one
| tried similar thing before. Was anyone did anything with GPIO as
input for use
| with SDL library?
You could make a kernel driver, but instead of using a character device,
register as a joystick input device. SDL will see your gpio buttons as
regular joystick buttons.
Raphael Assenat
8D Technologies Inc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org