summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xtscal
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-graphics/xtscal
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-graphics/xtscal')
-rw-r--r--meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh10
-rw-r--r--meta/recipes-graphics/xtscal/xtscal/change-cross.patch16
-rw-r--r--meta/recipes-graphics/xtscal/xtscal/cleanup.patch619
-rw-r--r--meta/recipes-graphics/xtscal/xtscal_0.6.3.bb24
4 files changed, 669 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh b/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
new file mode 100644
index 0000000000..ee55784548
--- /dev/null
+++ b/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3. /etc/formfactor/config
4
5if [ "$HAVE_TOUCHSCREEN" = "1" ]; then
6 while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ]
7 do
8 /usr/bin/xtscal
9 done
10fi
diff --git a/meta/recipes-graphics/xtscal/xtscal/change-cross.patch b/meta/recipes-graphics/xtscal/xtscal/change-cross.patch
new file mode 100644
index 0000000000..3ecd36bb5e
--- /dev/null
+++ b/meta/recipes-graphics/xtscal/xtscal/change-cross.patch
@@ -0,0 +1,16 @@
1--- tmp/main.c.orig 2007-01-02 15:39:54.000000000 +0000
2+++ tmp/main.c 2007-01-02 15:39:54.000000000 +0000
3@@ -131,9 +131,10 @@
4 {
5 XRenderFillRectangles (dpy, PictOpSrc, pict, &rect_color, rectangles, 2);
6
7- XFillArc (dpy, crosshair_w, crosshair_gc, (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
8- (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
9- WIDTH + 1, WIDTH + 1, 0, 360 * 64);
10+ XFillRectangle (dpy, crosshair_w, crosshair_gc,
11+ (CROSSHAIR_SIZE / 2) - (WIDTH / 2),
12+ (CROSSHAIR_SIZE / 2) - (WIDTH / 2),
13+ WIDTH, WIDTH);
14 }
15
16 void
diff --git a/meta/recipes-graphics/xtscal/xtscal/cleanup.patch b/meta/recipes-graphics/xtscal/xtscal/cleanup.patch
new file mode 100644
index 0000000000..ce674edef6
--- /dev/null
+++ b/meta/recipes-graphics/xtscal/xtscal/cleanup.patch
@@ -0,0 +1,619 @@
1---
2 Makefile.am | 9 --
3 configure.ac | 3
4 gpe-dist.am | 12 ---
5 h3600_ts.h | 216 -----------------------------------------------------------
6 main.c | 210 ++-------------------------------------------------------
7 xtscal.in | 19 -----
8 6 files changed, 14 insertions(+), 455 deletions(-)
9
10Index: xtscal-0.6.3/xtscal.in
11===================================================================
12--- xtscal-0.6.3.orig/xtscal.in 2004-09-10 20:10:36.000000000 +0100
13+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
14@@ -1,19 +0,0 @@
15-#!/bin/sh
16-
17-module_id() {
18- # Get model name
19- echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
20-}
21-
22-case `module_id` in
23- "HP IPAQ H3100" | "HP IPAQ H3800" )
24- ARGS="-rotate 90" ;;
25- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
26- ARGS="-rotate 270" ;;
27- # H2200: works without rotation
28-esac
29-
30-# the things we do for autoconf
31-prefix=@prefix@
32-exec_prefix=@exec_prefix@
33-exec @libexecdir@/xtscal.bin $ARGS $*
34Index: xtscal-0.6.3/main.c
35===================================================================
36--- xtscal-0.6.3.orig/main.c 2007-07-01 01:12:52.000000000 +0100
37+++ xtscal-0.6.3/main.c 2007-07-01 01:12:55.000000000 +0100
38@@ -22,12 +22,10 @@
39 #include <X11/Xlib.h>
40
41 #include <X11/extensions/Xrender.h>
42-#include <X11/extensions/Xrandr.h>
43 #include <X11/Xft/Xft.h>
44 #include <X11/extensions/xcalibrate.h>
45 #include <X11/keysym.h>
46
47-#include "h3600_ts.h"
48 #include "calibrate.h"
49
50 Display *dpy;
51@@ -45,15 +43,11 @@ XftColor xftcol;
52 XftDraw *xftdraw;
53 XftFont *xftfont;
54 int screen_x, screen_y;
55-int ts_fd;
56 int samples;
57 Pixmap bg_pixmap;
58 int flag_debug;
59-int rotation = 0;
60 int error_base, event_base;
61
62-int using_xcalibrate;
63-
64 int moving;
65
66 #define CROSSHAIR_SIZE 25
67@@ -63,7 +57,6 @@ int moving;
68 #define ENOUGH 5
69 #define MAX_SAMPLES 40
70
71-#define RAW_DEVICE "/dev/h3600_tsraw"
72 #define FONTNAME "sans-10"
73
74 struct point
75@@ -287,12 +280,8 @@ sort_by_y (const void* a, const void *b)
76 void
77 set_calibration (calibration *cal)
78 {
79- TS_CAL tc;
80- int xtrans, ytrans, xscale, yscale, xyscale, yxscale;
81 calibration ocal = *cal;
82
83- if (using_xcalibrate)
84- {
85 FILE *fp;
86 if (flag_debug)
87 printf ("constants are: %d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
88@@ -304,29 +293,6 @@ set_calibration (calibration *cal)
89 }
90 fprintf (fp, "%d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
91 fclose (fp);
92- return;
93- }
94-
95- xtrans = cal->a[0] / cal->a[6];
96- ytrans = cal->a[3] / cal->a[6];
97- xscale = cal->a[1] * 256 / cal->a[6];
98- yscale = cal->a[5] * 256 / cal->a[6];
99- xyscale = cal->a[2] * 256 / cal->a[6];
100- yxscale = cal->a[4] * 256 / cal->a[6];
101-
102- tc.xtrans = xtrans;
103- tc.ytrans = ytrans;
104- tc.xscale = xscale;
105- tc.yscale = yscale;
106- tc.xyswap = 0;
107-
108- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
109-
110- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
111- {
112- perror ("TS_SET_CAL");
113- exit (1);
114- }
115 }
116
117 void
118@@ -398,80 +364,13 @@ handle_ts_event (int x, int y, int press
119 }
120
121 void
122-read_ts (void)
123-{
124- TS_EVENT ts_ev;
125- int r;
126-
127- r = read (ts_fd, &ts_ev, sizeof (ts_ev));
128- if (r == sizeof (ts_ev))
129- handle_ts_event (ts_ev.x, ts_ev.y, ts_ev.pressure);
130-}
131-
132-void
133-do_cal (char **args)
134-{
135- TS_CAL tc;
136-
137- tc.xscale = atoi (args[0]);
138- tc.xtrans = atoi (args[1]);
139- tc.yscale = atoi (args[2]);
140- tc.ytrans = atoi (args[3]);
141- tc.xyswap = atoi (args[4]);
142-
143- if (flag_debug)
144- fprintf (stderr, "setting: %d %d %d %d %d\n",
145- tc.xtrans, tc.ytrans, tc.xscale, tc.yscale, tc.xyswap);
146-
147- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
148- {
149- perror ("TS_SET_CAL");
150- exit (1);
151- }
152-
153- exit (0);
154-}
155-
156-void
157-show_cal (void)
158-{
159- TS_CAL tc;
160-
161- if (ioctl (ts_fd, TS_GET_CAL, (void *)&tc) != 0)
162- {
163- perror ("TS_GET_CAL");
164- exit (1);
165- }
166-
167- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
168-}
169-
170-void
171 usage (const char *name)
172 {
173- fprintf (stderr, "usage: %s -view\n", name);
174- fprintf (stderr, " %s [-rotate <0 | 90 | 180 | 270>]\n", name);
175- fprintf (stderr, " %s -cal <xs> <xt> <ys> <yt> <xyswap>\n", name);
176-
177+ fprintf (stderr, "usage: %s [-debug]\n", name);
178 exit (1);
179 }
180
181 int
182-xrr_supported (void)
183-{
184- int xrr_event_base, xrr_error_base;
185- int xrr_major, xrr_minor;
186-
187- if (XRRQueryExtension (dpy, &xrr_event_base, &xrr_error_base) == False
188- || XRRQueryVersion (dpy, &xrr_major, &xrr_minor) == 0
189- || xrr_major != 1
190- || xrr_minor < 1)
191- return 0;
192-
193- return 1;
194-}
195-
196-int
197 main (int argc, char *argv[])
198 {
199 XSetWindowAttributes attributes;
200@@ -480,31 +379,11 @@ main (int argc, char *argv[])
201 int max_fd;
202 GC bg_gc;
203 int i;
204- int have_xrandr;
205
206 for (i = 1; i < argc; i++)
207 {
208- if (!strcmp (argv[i], "-view"))
209- {
210- show_cal ();
211- exit (0);
212- }
213- else if (!strcmp (argv[i], "-debug"))
214+ if (!strcmp (argv[i], "-debug"))
215 flag_debug = 1;
216- else if (!strcmp (argv[i], "-cal"))
217- {
218- if (argc > (i + 5))
219- do_cal (argv + i + 1);
220- else
221- usage (argv[0]);
222- }
223- else if (!strcmp (argv[i], "-rotate"))
224- {
225- if (argc > (i + 1))
226- rotation = atoi (argv[++i]);
227- else
228- usage (argv[0]);
229- }
230 else
231 usage (argv[0]);
232 }
233@@ -531,48 +410,11 @@ main (int argc, char *argv[])
234 fprintf (stderr, "failed to set raw mode: error %d\n", r);
235 exit (1);
236 }
237-
238- using_xcalibrate = 1;
239- }
240-
241- have_xrandr = xrr_supported ();
242- if (have_xrandr)
243- {
244- XRRScreenConfiguration *rr_screen;
245- Rotation current_rotation;
246-
247- if (flag_debug)
248- fprintf (stderr, "XRANDR is supported\n");
249-
250- rr_screen = XRRGetScreenInfo (dpy, RootWindow (dpy, screen));
251-
252- XRRRotations (dpy, screen, &current_rotation);
253-
254- XRRFreeScreenConfigInfo (rr_screen);
255-
256- if (flag_debug)
257- fprintf (stderr, "Current RANDR rotation is %d\n", current_rotation);
258-
259- switch (current_rotation)
260- {
261- case RR_Rotate_270:
262- rotation += 90;
263- case RR_Rotate_180:
264- rotation += 90;
265- case RR_Rotate_90:
266- rotation += 90;
267- rotation %= 360;
268- case RR_Rotate_0:
269- break;
270- default:
271- fprintf (stderr, "Unknown RANDR rotation: %d\n", current_rotation);
272- break;
273- }
274 }
275 else
276 {
277- if (flag_debug)
278- fprintf (stderr, "XRANDR not supported\n");
279+ perror ("XCALIBRATE extension missing");
280+ exit (1);
281 }
282
283 attributes.override_redirect = flag_debug ? False : True;
284@@ -666,45 +508,17 @@ main (int argc, char *argv[])
285
286 for (i = 0; i < NR_POINTS; i++)
287 {
288- switch (rotation)
289- {
290- case 0:
291- cal.xfb[i] = cal.xscr[i];
292- cal.yfb[i] = cal.yscr[i];
293- break;
294- case 90:
295- cal.xfb[i] = cal.yscr[i];
296- cal.yfb[i] = screen_x - cal.xscr[i];
297- break;
298- case 180:
299- cal.xfb[i] = screen_x - cal.xscr[i];
300- cal.yfb[i] = screen_y - cal.yscr[i];
301- break;
302- case 270:
303- cal.xfb[i] = screen_y - cal.yscr[i];
304- cal.yfb[i] = cal.xscr[i];
305- break;
306- }
307+ cal.xfb[i] = cal.xscr[i];
308+ cal.yfb[i] = cal.yscr[i];
309+ XCalibrateScreenToCoord (dpy, &cal.xfb[i], &cal.yfb[i]);
310
311 if (flag_debug)
312- printf ("rotation %d: (%d,%d) -> (%d,%d)\n", rotation,
313+ printf ("rotation conversion: (%d,%d) -> (%d,%d)\n",
314 cal.xscr[i], cal.yscr[i], cal.xfb[i], cal.yfb[i]);
315 }
316
317 next_event ();
318
319- if (!using_xcalibrate)
320- {
321- ts_fd = open (RAW_DEVICE, O_RDONLY);
322- if (ts_fd < 0)
323- {
324- perror (RAW_DEVICE);
325- exit (1);
326- }
327- }
328-
329- max_fd = (xfd > ts_fd) ? xfd : ts_fd;
330-
331 for (;;)
332 {
333 fd_set fds;
334@@ -713,12 +527,8 @@ main (int argc, char *argv[])
335
336 FD_ZERO (&fds);
337 FD_SET (xfd, &fds);
338- if (ts_fd != -1)
339- FD_SET (ts_fd, &fds);
340
341- select (max_fd + 1, &fds, NULL, NULL, NULL);
342-
343- if (ts_fd != -1 && FD_ISSET (ts_fd, &fds))
344- read_ts ();
345+ select (xfd + 1, &fds, NULL, NULL, NULL);
346 }
347 }
348+
349Index: xtscal-0.6.3/configure.ac
350===================================================================
351--- xtscal-0.6.3.orig/configure.ac 2004-09-10 20:11:12.000000000 +0100
352+++ xtscal-0.6.3/configure.ac 2007-07-01 01:12:55.000000000 +0100
353@@ -9,8 +9,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
354 # Checks for programs.
355 AC_PROG_CC
356
357-PKG_CHECK_MODULES(XTSCAL, x11 xft xext xrandr xcalibrate)
358+PKG_CHECK_MODULES(XTSCAL, x11 xft xext xcalibrate)
359
360 AC_CONFIG_FILES([Makefile])
361-AC_CONFIG_FILES([xtscal])
362 AC_OUTPUT
363Index: xtscal-0.6.3/gpe-dist.am
364===================================================================
365--- xtscal-0.6.3.orig/gpe-dist.am 2004-06-02 23:07:13.000000000 +0100
366+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
367@@ -1,12 +0,0 @@
368-CVSTAG := $(shell echo $(PACKAGE)-$(VERSION) | tr [a-z.] [A-Z_])
369-
370-dist-upload: dist
371- scp $(PACKAGE)-$(VERSION).tar.bz2 $(USER)@handhelds.org:/home/ftp/pub/projects/gpe/source/
372-
373-tag:
374- cvs tag $(CVSTAG)
375-
376-retag:
377- cvs tag -F $(CVSTAG)
378-
379-source: tag dist-upload
380Index: xtscal-0.6.3/h3600_ts.h
381===================================================================
382--- xtscal-0.6.3.orig/h3600_ts.h 2003-07-05 17:27:10.000000000 +0100
383+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
384@@ -1,216 +0,0 @@
385-/*
386-*
387-* Driver for the H3600 Touch Screen and other Atmel controlled devices.
388-*
389-* Copyright 2000 Compaq Computer Corporation.
390-*
391-* Use consistent with the GNU GPL is permitted,
392-* provided that this copyright notice is
393-* preserved in its entirety in all copies and derived works.
394-*
395-* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
396-* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
397-* FITNESS FOR ANY PARTICULAR PURPOSE.
398-*
399-* Author: Charles Flynn.
400-*
401-*/
402-
403-
404-#ifndef __H3600_TS_H__
405-#define __H3600_TS_H__
406-
407-#include <linux/ioctl.h>
408-
409-enum h3600_ts_minor_devices {
410- TS_MINOR = 0,
411- TSRAW_MINOR = 1,
412- KEY_MINOR = 2
413-};
414-
415-typedef struct h3600_ts_calibration {
416- int xscale;
417- int xtrans;
418- int yscale;
419- int ytrans;
420- int xyswap;
421-} TS_CAL;
422-
423-typedef struct h3600_ts_event {
424- unsigned short pressure;
425- unsigned short x;
426- unsigned short y;
427- unsigned short pad;
428-} TS_EVENT;
429-
430-/* Deprecated - do not use */
431-typedef struct h3600_ts_return {
432- unsigned short pressure;
433- unsigned short x;
434- unsigned short y;
435- unsigned short pad;
436-} TS_RET;
437-
438-enum power_button_mode {
439- PBM_SUSPEND = 0,
440- PBM_GENERATE_KEYPRESS = 1
441-};
442-
443-
444-/* ++++++++++++++ +++++++++++++++++++++++++++++++++++++ */
445-
446-typedef struct therm_dev {
447- short data;
448-} THERM_DEV;
449-
450-#define H3600_BATT_CHEM_ALKALINE 0x01
451-#define H3600_BATT_CHEM_NICD 0x02
452-#define H3600_BATT_CHEM_NIMH 0x03
453-#define H3600_BATT_CHEM_LION 0x04
454-#define H3600_BATT_CHEM_LIPOLY 0x05
455-#define H3600_BATT_CHEM_NOT_INSTALLED 0x06
456-#define H3600_BATT_CHEM_UNKNOWN 0xff
457-
458-/* These should match the apm_bios.h definitions */
459-#define H3600_AC_STATUS_AC_OFFLINE 0x00
460-#define H3600_AC_STATUS_AC_ONLINE 0x01
461-#define H3600_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */
462-#define H3600_AC_STATUS_AC_UNKNOWN 0xff
463-
464-/* These bitfields are rarely "or'd" together */
465-#define H3600_BATT_STATUS_HIGH 0x01
466-#define H3600_BATT_STATUS_LOW 0x02
467-#define H3600_BATT_STATUS_CRITICAL 0x04
468-#define H3600_BATT_STATUS_CHARGING 0x08
469-#define H3600_BATT_STATUS_CHARGE_MAIN 0x10
470-#define H3600_BATT_STATUS_DEAD 0x20 /* Battery will not charge */
471-#define H3600_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */
472-#define H3600_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */
473-#define H3600_BATT_STATUS_NOBATT 0x80
474-#define H3600_BATT_STATUS_UNKNOWN 0xff
475-
476-struct battery_data {
477- unsigned char chemistry;
478- unsigned char status;
479- unsigned short voltage; /* Voltage for battery #0; unknown for battery #1 */
480- unsigned short percentage; /* Percentage of full charge */
481- unsigned short life; /* Life remaining in minutes */
482-};
483-
484-struct h3600_battery {
485- unsigned char ac_status;
486- unsigned char battery_count; /* How many batteries we have */
487- struct battery_data battery[2];
488-};
489-
490-/* -------- EEPROM and SPI Interfaces ---------------*/
491-
492-#define EEPROM_RD_BUFSIZ 6 /* EEPROM reads are 16 bits */
493-#define EEPROM_WR_BUFSIZ 5 /* Allow room for 8bit 'addr' field in buffer*/
494-#define SPI_RD_BUFSIZ 16 /* SPI reads are 8 bits */
495-#define SPI_WR_BUFSIZ 7
496-
497-/* The EEPROM is where internal programs are stored on the Amtel.
498- You probably don't want to read or write these values */
499-
500-typedef struct h3600_eeprom_read_request {
501- unsigned char addr; /* 8bit Address Offset 0-255 */
502- unsigned char len; /* Number of 16bit words to read 0-128 */
503- unsigned short buff[EEPROM_RD_BUFSIZ];
504-} EEPROM_READ;
505-
506-typedef struct h3600_eeprom_write_request {
507- unsigned char len; /* used only to compute the number of bytes to send */
508- unsigned char addr; /* 0-128 */
509- unsigned short buff[EEPROM_WR_BUFSIZ];
510-} EEPROM_WRITE;
511-
512-/* The SPI bus connects to EEPROMs located on sleeves plugged into
513- the iPAQ. You may want to read these values */
514-
515-typedef struct h3600_spi_read_request {
516- unsigned short addr; /* 16bit Address Offset 0-128 */
517- unsigned char len; /* Number of bytes to read */
518- unsigned char buff[SPI_RD_BUFSIZ];
519-} SPI_READ;
520-
521-#define SPI_READ_STATUS_BYTE 0xffff /* Use this address to read the status byte */
522-
523-typedef struct h3600_spi_write_request {
524- unsigned short len; /* used only to compute the number of bytes to send */
525- unsigned short addr; /* this 16bit address accesses a single byte */
526- unsigned char buff[SPI_WR_BUFSIZ];
527-} SPI_WRITE;
528-
529-
530-/* -------- end of EEPROM and SPI Interfaces ---------------*/
531-
532-/* User space structures for IOCTL calls */
533-
534-typedef struct h3600_ts_version {
535- unsigned char host_version[8]; /* ascii "x.yy" */
536- unsigned char pack_version[8]; /* ascii "x.yy" */
537- unsigned char boot_type; /* TODO ?? */
538-} VER_RET;
539-
540-typedef struct h3600_ts_led {
541- unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
542- unsigned char TotalTime; /* Units of 5 seconds */
543- unsigned char OnTime; /* units of 100m/s */
544- unsigned char OffTime; /* units of 100m/s */
545-} LED_IN;
546-
547-enum flite_mode {
548- FLITE_MODE1 = 1,
549- FLITE_AUTO_MODE = 1, /* for reference only */
550- FLITE_MANUAL_MODE = 2, /* Use this normally? */
551- FLITE_GET_LIGHT_SENSOR = 3 /* Returns light reading in "brightness" field */
552-};
553-enum flite_pwr {
554- FLITE_PWR_OFF = 0,
555- FLITE_PWR_ON = 1
556-};
557-
558-typedef struct h3600_ts_flite {
559- unsigned char mode;
560- unsigned char pwr;
561- unsigned char brightness;
562-} FLITE_IN;
563-
564-/*************************** Updated "universal" structures *******************/
565-
566-/* Sets backlight for both H3100 and H3600 models - technically "frontlight" for H3600 */
567-struct h3600_ts_backlight {
568- enum flite_pwr power; /* 0 = off, 1 = on */
569- unsigned char brightness; /* 0 - 255 */
570-};
571-
572-struct h3600_ts_contrast { /* Only useful on H3100 model */
573- unsigned char contrast; /* 0 - 255 */
574-};
575-
576-/* IOCTL cmds user or kernel space */
577-
578-/* Use 'f' as magic number */
579-#define IOC_H3600_TS_MAGIC 'f'
580-
581-/* TODO: Some of these IOWR values are just plain wrong */
582-#define GET_VERSION _IOR(IOC_H3600_TS_MAGIC, 1, struct h3600_ts_version )
583-#define READ_EEPROM _IOWR(IOC_H3600_TS_MAGIC, 2, struct h3600_eeprom_read_request)
584-#define WRITE_EEPROM _IOWR(IOC_H3600_TS_MAGIC, 3, struct h3600_eeprom_write_request)
585-#define GET_THERMAL _IOR(IOC_H3600_TS_MAGIC, 4, struct therm_dev)
586-#define LED_ON _IOW(IOC_H3600_TS_MAGIC, 5, struct h3600_ts_led)
587-#define GET_BATTERY_STATUS _IOR(IOC_H3600_TS_MAGIC, 6, struct h3600_battery)
588-#define FLITE_ON _IOW(IOC_H3600_TS_MAGIC, 7, struct h3600_ts_flite)
589-#define READ_SPI _IOWR(IOC_H3600_TS_MAGIC, 8, struct h3600_spi_read_request)
590-#define WRITE_SPI _IOWR(IOC_H3600_TS_MAGIC, 9, struct h3600_spi_write_request)
591-#define TS_GET_CAL _IOR(IOC_H3600_TS_MAGIC, 10, struct h3600_ts_calibration)
592-#define TS_SET_CAL _IOW(IOC_H3600_TS_MAGIC, 11, struct h3600_ts_calibration)
593-
594-/* New IOCTL interfaces - defined to be more user friendly */
595-#define TS_GET_BACKLIGHT _IOR(IOC_H3600_TS_MAGIC, 20, struct h3600_ts_backlight)
596-#define TS_SET_BACKLIGHT _IOW(IOC_H3600_TS_MAGIC, 20, struct h3600_ts_backlight)
597-#define TS_GET_CONTRAST _IOR(IOC_H3600_TS_MAGIC, 21, struct h3600_ts_contrast)
598-#define TS_SET_CONTRAST _IOW(IOC_H3600_TS_MAGIC, 21, struct h3600_ts_contrast)
599-
600-#endif
601Index: xtscal-0.6.3/Makefile.am
602===================================================================
603--- xtscal-0.6.3.orig/Makefile.am 2004-06-02 23:07:13.000000000 +0100
604+++ xtscal-0.6.3/Makefile.am 2007-07-02 12:51:02.000000000 +0100
605@@ -1,11 +1,8 @@
606-libexec_PROGRAMS = xtscal.bin
607-bin_SCRIPTS = xtscal
608+bin_PROGRAMS = xtscal
609
610-xtscal_bin_SOURCES = main.c calibrate.c calibrate.h h3600_ts.h
611+xtscal_SOURCES = main.c calibrate.c calibrate.h
612
613-xtscal_bin_LDADD = @XTSCAL_LIBS@
614+xtscal_LDADD = @XTSCAL_LIBS@
615
616 INCLUDES = @XTSCAL_CFLAGS@ -DNR_POINTS=5
617
618-include gpe-dist.am
619-
diff --git a/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb b/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb
new file mode 100644
index 0000000000..565393d062
--- /dev/null
+++ b/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "Touchscreen calibration utility"
2HOMEPAGE = "http://gpe.linuxtogo.org"
3BUGTRACKER = "http://bugs.linuxtogo.org"
4LICENSE = "GPLv2 & GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
6 file://main.c;endline=10;md5=8721bcb08ae9f24e5fe4c82941873c87"
7
8SECTION = "x11/base"
9
10DEPENDS = "virtual/libx11 libxft libxcalibrate"
11
12PR = "r12"
13
14SRC_URI = "${GPE_MIRROR}/xtscal-${PV}.tar.bz2 \
15 file://change-cross.patch;patch=1 \
16 file://cleanup.patch;patch=1 \
17 file://30xTs_Calibrate.sh"
18
19inherit autotools
20
21do_install_append() {
22 install -d ${D}${sysconfdir}/X11/Xsession.d/
23 install -m 0755 ${WORKDIR}/30xTs_Calibrate.sh ${D}${sysconfdir}/X11/Xsession.d/
24}