Hello Nathanael,
To add configurable values for your module, you'll need to work with two
files:
./src/misc/conf.c
./src/misc/conf.h
Example patch for 0.9.24 source tree is attached. It just adds new dfbconfig
parameter, which you can simply use in your input module.
You will also need to add options for main configure script, but I guess it's
better to discuss it with one of main developers.
Also, you may find useful this post -
http://mail.directfb.org/pipermail/directfb-dev/2005-July/000468.html
Patch for ELO touchscreen, attached to that post, contains example how to add
calibration paramaters as well.
Sunday 27 November 2005 02:43, Nathanael D. Noblet You wrote:
> Hello,
> I'm attempting to provide an inputdriver for the gunze serial
> touchscreens. I'm using the MuTouch as a skeleton. Where do I find out
> about some of the internal API? For example the dfbconfig object it uses
> but doesn't seem to be declared anywhere etc... As they are both serial
> devices I'm assuming they'll both need config file parameters, but I'm
> unsure how to go about that part, for now I will hardcode the values as
> they work for me but more info would be great.
>
> Thanks,
> --
> Nathanael D. Noblet
> Gnat Solutions
> http://www.gnat.ca/
> T 250.385.4613
> C 250.893.4613
>
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
Regards,
--
Ivan Daniluk,
technical director,
Profit Solution Software,
Kiev, Ukraine.
diff -Nru DirectFB-0.9.24-orig/src/misc/conf.c DirectFB-0.9.24/src/misc/conf.c
--- DirectFB-0.9.24-orig/src/misc/conf.c 2005-11-27 17:40:54.000000000 +0200
+++ DirectFB-0.9.24/src/misc/conf.c 2005-11-27 17:44:01.000000000 +0200
@@ -120,6 +120,7 @@
" Matrox cable type (default=composite)\n"
" h3600-device=<device> Use this device for the H3600 TS driver\n"
" mut-device=<device> Use this device for the MuTouch driver\n"
+ " gunze-device=<device> Use this device for the Gunze Touchscreen driver\n"
"\n"
" Window surface swapping policy:\n"
" window-surface-policy=(auto|videohigh|videolow|systemonly|videoonly)\n"
@@ -980,6 +981,18 @@
D_ERROR( "DirectFB/Config: No MuTouch device specified!\n" );
return DFB_INVARG;
}
+ } else
+ if (strcmp (name, "gunze-device" ) == 0) {
+ if (value) {
+ if (dfb_config->gunze_device)
+ D_FREE( dfb_config->gunze_device );
+
+ dfb_config->gunze_device = D_STRDUP( value );
+ }
+ else {
+ D_ERROR( "DirectFB/Config: No Gunze device specified!\n" );
+ return DFB_INVARG;
+ }
}
else
return DFB_UNSUPPORTED;
diff -Nru DirectFB-0.9.24-orig/src/misc/conf.h DirectFB-0.9.24/src/misc/conf.h
--- DirectFB-0.9.24-orig/src/misc/conf.h 2005-11-27 17:40:54.000000000 +0200
+++ DirectFB-0.9.24/src/misc/conf.h 2005-11-27 17:41:37.000000000 +0200
@@ -138,6 +138,8 @@
char *h3600_device; /* H3600 Touchscreen Device */
char *mut_device; /* MuTouch Device */
+
+ char *gunze_device; /* Gunze Touchscreen Device */
} DFBConfig;
extern DFBConfig *dfb_config;
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev