ChangeLog | 39 -- Makefile.am | 13 configure.ac | 2 man/elographics.man | 4 src/xf86Elo.c | 894 ++++++++-------------------------------------------- 5 files changed, 156 insertions(+), 796 deletions(-)
New commits: commit 37cd09e99c7f5fa4ce7511b8ed171a3ae130300f Author: Peter Hutterer <peter.hutte...@redhat.com> Date: Tue Oct 21 15:33:43 2008 +1030 elographics 1.2.3 diff --git a/configure.ac b/configure.ac index 599c5a0..4801a9c 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-input-elographics], - 1.2.2, + 1.2.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-input-elographics) commit 117a54598043df6497fbc1ae4f047cc248441072 Author: Peter Hutterer <peter.hutte...@redhat.com> Date: Tue Oct 14 10:22:29 2008 +1030 Add special handling for Sunit dSeries. RH #445193 This model does not reply to queries about touchscreen identification. After opening the fd, we can skip right to enabling the device. Red Hat Bug <https://bugzilla.redhat.com/show_bug.cgi?id=445193> diff --git a/man/elographics.man b/man/elographics.man index 9f59941..3a3e84e 100644 --- a/man/elographics.man +++ b/man/elographics.man @@ -73,7 +73,7 @@ event to occur. Default: 5 (50ms). Delay between report packets. Default: 1 (10ms). .TP .BI "Option \*qModel\*q \*q" string \*q -The touchscreen model. Default: unset. +The touchscreen model. Default: unset. Supported models: "Sunit dSeries". .SH "SEE ALSO" __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__). .SH AUTHORS diff --git a/src/xf86Elo.c b/src/xf86Elo.c index d1c89e5..1620e44 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -69,6 +69,7 @@ * models to be treated specially. */ #define MODEL_UNKNOWN -1 +#define MODEL_SUNIT_D 1 typedef struct { int type; @@ -77,6 +78,7 @@ typedef struct { static Model SupportedModels[] = { + {MODEL_SUNIT_D, "Sunit dSeries"}, /* sunit dSeries models don't reply to queries */ {MODEL_UNKNOWN, NULL} }; /* @@ -860,57 +862,61 @@ xf86EloControl(DeviceIntPtr dev, Error("Unable to open Elographics touchscreen device"); return !Success; } - /* - * Try to see if the link is at the specified rate and - * ask the controller to report various infos. - */ - memset(req, 0, ELO_PACKET_SIZE); - req[1] = tolower(ELO_PARAMETER); - if (xf86EloSendQuery(req, reply, local->fd) != Success) { - priv->is_a_2310 = 1; - ErrorF("Not at the specified rate or model 2310, will continue\n"); - } - /* - * Ask the controller to report various infos. - */ - memset(req, 0, ELO_PACKET_SIZE); - req[1] = tolower(ELO_ID); - if (xf86EloSendQuery(req, reply, local->fd) == Success) { - xf86EloPrintIdent(reply, priv); - } - else { - ErrorF("Unable to ask Elographics touchscreen identification\n"); - goto not_success; - } + if (priv->model != MODEL_SUNIT_D) + { + /* + * Try to see if the link is at the specified rate and + * ask the controller to report various infos. + */ + memset(req, 0, ELO_PACKET_SIZE); + req[1] = tolower(ELO_PARAMETER); + if (xf86EloSendQuery(req, reply, local->fd) != Success) { + priv->is_a_2310 = 1; + ErrorF("Not at the specified rate or model 2310, will continue\n"); + } - /* - * Set the operating mode: Stream, no scaling, no calibration, - * no range checking, no trim, tracking enabled. - */ - memset(req, 0, ELO_PACKET_SIZE); - req[1] = ELO_MODE; - req[3] = ELO_TOUCH_MODE | ELO_STREAM_MODE | ELO_UNTOUCH_MODE; - req[4] = ELO_TRACKING_MODE; - if (xf86EloSendControl(req, local->fd) != Success) { - ErrorF("Unable to change Elographics touchscreen operating mode\n"); - goto not_success; - } + /* + * Ask the controller to report various infos. + */ + memset(req, 0, ELO_PACKET_SIZE); + req[1] = tolower(ELO_ID); + if (xf86EloSendQuery(req, reply, local->fd) == Success) { + xf86EloPrintIdent(reply, priv); + } + else { + ErrorF("Unable to ask Elographics touchscreen identification\n"); + goto not_success; + } - /* - * Set the touch reports timings from configuration data. - */ - memset(req, 0, ELO_PACKET_SIZE); - req[1] = ELO_REPORT; - req[2] = priv->untouch_delay; - req[3] = priv->report_delay; - if (xf86EloSendControl(req, local->fd) != Success) { - ErrorF("Unable to change Elographics touchscreen reports timings\n"); - - not_success: - SYSCALL(close(local->fd)); - local->fd = -1; - return !Success; + /* + * Set the operating mode: Stream, no scaling, no calibration, + * no range checking, no trim, tracking enabled. + */ + memset(req, 0, ELO_PACKET_SIZE); + req[1] = ELO_MODE; + req[3] = ELO_TOUCH_MODE | ELO_STREAM_MODE | ELO_UNTOUCH_MODE; + req[4] = ELO_TRACKING_MODE; + if (xf86EloSendControl(req, local->fd) != Success) { + ErrorF("Unable to change Elographics touchscreen operating mode\n"); + goto not_success; + } + + /* + * Set the touch reports timings from configuration data. + */ + memset(req, 0, ELO_PACKET_SIZE); + req[1] = ELO_REPORT; + req[2] = priv->untouch_delay; + req[3] = priv->report_delay; + if (xf86EloSendControl(req, local->fd) != Success) { + ErrorF("Unable to change Elographics touchscreen reports timings\n"); + +not_success: + SYSCALL(close(local->fd)); + local->fd = -1; + return !Success; + } } xf86AddEnabledDevice(local); dev->public.on = TRUE; commit d0aa1083c0130861a2c78509b72847fc3f7ee5f3 Author: Peter Hutterer <peter.hutte...@redhat.com> Date: Tue Oct 14 10:11:11 2008 +1030 Add Option "Model" to supported list of options. Some touchscreens supported by this driver need special handling, hence the explicit specification of the model. Note that this commit does not actually do anything with the information, it just sets some internal state. Signed-off-by: Peter Hutterer <peter.hutte...@redhat.com> diff --git a/man/elographics.man b/man/elographics.man index 8dac6b5..9f59941 100644 --- a/man/elographics.man +++ b/man/elographics.man @@ -71,6 +71,9 @@ event to occur. Default: 5 (50ms). .TP .BI "Option \*qReportDelay\*q \*q" integer \*q Delay between report packets. Default: 1 (10ms). +.TP +.BI "Option \*qModel\*q \*q" string \*q +The touchscreen model. Default: unset. .SH "SEE ALSO" __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__). .SH AUTHORS diff --git a/src/xf86Elo.c b/src/xf86Elo.c index dfb05d1..d1c89e5 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -65,6 +65,20 @@ #include "xf86Module.h" #endif +/** + * models to be treated specially. + */ +#define MODEL_UNKNOWN -1 + +typedef struct { + int type; + char *name; +} Model; + +static Model SupportedModels[] = +{ + {MODEL_UNKNOWN, NULL} +}; /* *************************************************************************** * @@ -186,6 +200,7 @@ typedef struct _EloPrivateRec { int packet_buf_p; /* Assembly buffer pointer */ int swap_axes; /* Swap X an Y axes if != 0 */ unsigned char packet_buf[ELO_PACKET_SIZE]; /* Assembly buffer */ + int model; /* one of MODEL_... */ } EloPrivateRec, *EloPrivatePtr; /* @@ -1039,6 +1054,9 @@ xf86EloInit(InputDriverPtr drv, char *str; int portrait = 0; int height, width; + char *opt_model; + Model* model; + local = xf86EloAllocate(drv); if (!local) { @@ -1065,6 +1083,19 @@ xf86EloInit(InputDriverPtr drv, } priv->input_dev = strdup(str); + opt_model = xf86SetStrOption(local->options, "Model", NULL); + model = SupportedModels; + priv->model = MODEL_UNKNOWN; + while(model->type != MODEL_UNKNOWN && opt_model) + { + if (!strcmp(model->name, opt_model)) + { + priv->model = model->type; + break; + } + model++; + } + local->name = xf86SetStrOption(local->options, "DeviceName", XI_TOUCHSCREEN); xf86Msg(X_CONFIG, "Elographics X device name: %s\n", local->name); priv->screen_no = xf86SetIntOption(local->options, "ScreenNo", 0); commit bf0e1bf915cb679bd425712300f5dc5c80ed190a Author: Peter Hutterer <peter.hutte...@redhat.com> Date: Thu Aug 14 15:34:51 2008 +0930 Fix build, xf86Version.h -> xorgVersion.h diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 923cf63..dfb05d1 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -47,7 +47,7 @@ #include "config.h" #endif -#include "xf86Version.h" +#include "xorgVersion.h" #ifndef XFree86LOADER commit 038798931482575adb411129f016e207034e2dee Author: William Brack <wbr...@mmm.com.hk> Date: Wed Jun 18 13:42:44 2008 +0930 Don't convert coordinates for servers 1.4 and above. These servers do the coordinate conversion themselves, so no need to do it in the driver. Signed-off-by: Peter Hutterer <pe...@cs.unisa.edu.au> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index ada6584..923cf63 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -392,6 +392,7 @@ xf86EloReadInput(LocalDevicePtr local) EloPrivatePtr priv = (EloPrivatePtr)(local->private); int cur_x, cur_y; int state; +#if GET_ABI_MAJOR(XINPUT_ABI) == 0 int first = 0; /* since convert is expecting 0 */ int num = 2; /* since convert is expecting 0 */ int v0 = 0; /* = cur_x - based on the debug output this is what v0 is */ @@ -400,14 +401,13 @@ xf86EloReadInput(LocalDevicePtr local) int v3 = 0; /* not used in convert */ int v4 = 0; /* not used in convert */ int v5 = 0; /* not used in convert */ - int x; /* output */ - int y; /* output */ +#endif DBG(4, ErrorF("Entering ReadInput\n")); /* * Try to get a packet. */ - while (xf86WaitForInput(local->fd, ELO_MAX_WAIT) > 0) { + while (xf86WaitForInput(local->fd, ELO_MAX_WAIT/100) > 0) { if(xf86EloGetPacket(priv->packet_buf, &priv->packet_buf_p, &priv->checksum, @@ -424,7 +424,7 @@ xf86EloReadInput(LocalDevicePtr local) cur_x = WORD_ASSEMBLY(priv->packet_buf[3], priv->packet_buf[4]); cur_y = WORD_ASSEMBLY(priv->packet_buf[5], priv->packet_buf[6]); state = priv->packet_buf[2] & 0x07; - +#if GET_ABI_MAJOR(XINPUT_ABI) == 0 /* * MHALAS: Based on the description in xf86XInputSetScreen * this code must be called from ReadInput BEFORE any events @@ -437,17 +437,18 @@ xf86EloReadInput(LocalDevicePtr local) * calib and before posting the event. */ - DBG(3, ErrorF("EloConvert Before Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); + DBG(3, ErrorF("EloConvert Before Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); v0 = cur_x; /* based on the debug output this is what v0 is */ - v1 = cur_y; /* based on the debug output this is what v0 is */ + v1 = cur_y; /* based on the debug output this is what v1 is */ /* * Use the conversion method to send correct coordinates * since it contains all necessary logic */ - xf86EloConvert(local, first, num, v0, v1, v2, v3, v4, v5, &x, &y); - DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); - xf86XInputSetScreen(local, priv->screen_no, x, y); - DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); + xf86EloConvert(local, first, num, v0, v1, v2, v3, v4, v5, &cur_x, &cur_y); + DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); + xf86XInputSetScreen(local, priv->screen_no, cur_x, cur_y); + DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); +#endif /* * Send events. @@ -456,13 +457,13 @@ xf86EloReadInput(LocalDevicePtr local) * location has changed as DIX assumes this. This is why we always * emit a motion, regardless of the kind of packet processed. */ - xf86PostMotionEvent(local->dev, TRUE, 0, 2, x, y); + xf86PostMotionEvent(local->dev, TRUE, 0, 2, cur_x, cur_y); /* * Emit a button press or release. */ if (state == ELO_PRESS || state == ELO_RELEASE) { - xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, x, y); + xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, cur_x, cur_y); } DBG(3, ErrorF("TouchScreen: x(%d), y(%d), %s\n", commit c73c44d8f68448737695a112b2e9d15b785ade2f Author: Peter Hutterer <pe...@cs.unisa.edu.au> Date: Tue Jun 17 14:11:58 2008 +0930 Remove RCS tags. diff --git a/man/elographics.man b/man/elographics.man index f47aaa1..8dac6b5 100644 --- a/man/elographics.man +++ b/man/elographics.man @@ -1,4 +1,3 @@ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/elographics/elographics.man,v 1.1 2001/01/24 00:06:36 dawes Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH elographics __drivermansuffix__ __vendorversion__ diff --git a/src/xf86Elo.c b/src/xf86Elo.c index cda2545..ada6584 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -1,4 +1,3 @@ -/* $XConsortium: xf86Elo.c /main/13 1996/10/25 14:11:31 kaleb $ */ /* * Copyright 1995, 1999 by Patrick Lecoanet, France. <lecoa...@cena.dgac.fr> * @@ -22,8 +21,6 @@ * */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/input/elographics/xf86Elo.c,v 1.13 2001/04/01 14:00:13 tsi Exp $ */ - /* ******************************************************************************* ******************************************************************************* commit a932fd4174ae4bf511e1418055f1470ba2860b43 Author: Peter Hutterer <pe...@cs.unisa.edu.au> Date: Tue Jun 17 14:18:31 2008 +0930 Remove XFREE_V4 define and all code that expects it to be unset. If you're still not running something more recent than X11 3, then you have other issues anyway. diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 9bca907..cda2545 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -51,11 +51,7 @@ #endif #include "xf86Version.h" -#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0) -#define XFREE86_V4 -#endif -#ifdef XFREE86_V4 #ifndef XFree86LOADER #include <unistd.h> @@ -72,134 +68,6 @@ #include "xf86Module.h" #endif -#else /* XFREE86_V4 */ - -#include <X11/Xos.h> -#include <signal.h> -#include <stdio.h> - -#define NEED_EVENTS -#include <X11/X.h> -#include <X11/Xproto.h> -#include "inputstr.h" -#include "scrnintstr.h" -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> - -#if defined(sun) && !defined(i386) -#include <errno.h> -#include <termio.h> -#include <fcntl.h> -#include <ctype.h> - -#include "extio.h" -#else /* defined(sun) && !defined(i386) */ -#include "compiler.h" - -#include "xf86.h" -#include "xf86Procs.h" -#include "xf86_OSlib.h" -#include "xf86_Config.h" -#include "xf86Xinput.h" -#endif /* defined(sun) && !defined(i386) */ - -#if !defined(sun) || defined(i386) -#include "os.h" -#include "osdep.h" -#include "exevents.h" - -#include "extnsionst.h" -#include "extinit.h" -#endif /* !defined(sun) || defined(i386) */ - -#endif /* XFREE86_V4 */ - - -#ifndef XFREE86_V4 -#if !defined(sun) || defined(i386) -/* - *************************************************************************** - * - * Configuration descriptor. - * - *************************************************************************** - */ - -#define PORT 1 -#define ELO_DEVICE_NAME 2 -#define SCREEN_NO 3 -#define UNTOUCH_DELAY 4 -#define REPORT_DELAY 5 -#define MAXX 6 -#define MAXY 7 -#define MINX 8 -#define MINY 9 -#define DEBUG_LEVEL 10 -#define HISTORY_SIZE 11 -#define LINK_SPEED 12 -#define ALWAYS_CORE 13 -#define SWAP_AXES 14 -#define PORTRAIT_MODE 15 - -static SymTabRec EloTab[] = { - { ENDSUBSECTION, "endsubsection" }, - { PORT, "port" }, - { ELO_DEVICE_NAME, "devicename" }, - { SCREEN_NO, "screenno" }, - { UNTOUCH_DELAY, "untouchdelay" }, - { REPORT_DELAY, "reportdelay"}, - { MAXX, "maximumxposition" }, - { MAXY, "maximumyposition" }, - { MINX, "minimumxposition" }, - { MINY, "minimumyposition" }, - { DEBUG_LEVEL, "debuglevel" }, - { HISTORY_SIZE, "historysize" }, - { LINK_SPEED, "linkspeed" }, - { ALWAYS_CORE, "alwayscore" }, - { SWAP_AXES, "swapxy" }, - { PORTRAIT_MODE, "portraitmode" }, - { -1, "" }, -}; - -#define LS300 1 -#define LS1200 2 -#define LS2400 3 -#define LS9600 4 -#define LS19200 5 - -static SymTabRec LinkSpeedTab[] = { - { LS300, "b300" }, - { LS1200, "b1200" }, - { LS2400, "b2400" }, - { LS9600, "b9600" }, - { LS19200, "b19200" } -}; -#endif /* !defined(sun) || defined(i386) */ - -/* - * This struct connects a line speed with - * a compatible motion packet delay. The - * driver will attempt to enforce a correct - * delay (according to this table) in order to - * avoid losing data in the touchscreen controller. - * LinkSpeedValues should be kept in sync with - * LinkSpeedTab. - */ -typedef struct { - int speed; - int delay; -} LinkParameterStruct; - -static LinkParameterStruct LinkSpeedValues[] = { - { B300, 32 }, - { B1200, 8 }, - { B2400, 4 }, - { B9600, 1 }, - { B19200, 0 } -}; -#endif /* XFREE86_V4 */ - - /* *************************************************************************** * @@ -287,7 +155,6 @@ static int debug_level = 0; #define DBG(lvl, f) #endif -#ifdef XFREE86_V4 #undef SYSCALL #undef read #undef write @@ -296,7 +163,6 @@ static int debug_level = 0; #define read(fd, ptr, num) xf86ReadSerial(fd, ptr, num) #define write(fd, ptr, num) xf86WriteSerial(fd, ptr, num) #define close(fd) xf86CloseSerial(fd) -#endif /* @@ -314,9 +180,6 @@ typedef struct _EloPrivateRec { int max_y; /* Maximum y */ int untouch_delay; /* Delay before reporting an untouch (in ms) */ int report_delay; /* Delay between touch report packets */ -#ifndef XFREE86_V4 - int link_speed; /* Speed of the RS232 link connecting the ts. */ -#endif int screen_no; /* Screen associated with the device */ int screen_width; /* Width of the associated X screen */ int screen_height; /* Height of the screen */ @@ -328,262 +191,6 @@ typedef struct _EloPrivateRec { unsigned char packet_buf[ELO_PACKET_SIZE]; /* Assembly buffer */ } EloPrivateRec, *EloPrivatePtr; - -#ifndef XFREE86_V4 -#if !defined(sun) || defined(i386) -/* - *************************************************************************** - * - * xf86EloConfig -- - * Configure the driver from the configuration data. - * - *************************************************************************** - */ -static Bool -xf86EloConfig(LocalDevicePtr *array, - int inx, - int max, - LexPtr val) -{ - LocalDevicePtr local = array[inx]; - EloPrivatePtr priv = (EloPrivatePtr)(local->private); - int token; - int portrait=0; - - while ((token = xf86GetToken(EloTab)) != ENDSUBSECTION) { - switch(token) { - - case PORT: - if (xf86GetToken(NULL) != STRING) { - xf86ConfigError("Elographics input port expected"); - } - priv->input_dev = strdup(val->str); - if (xf86Verbose) { - ErrorF("%s Elographics input port: %s\n", - XCONFIG_GIVEN, priv->input_dev); - } - break; - - case ELO_DEVICE_NAME: - if (xf86GetToken(NULL) != STRING) { - xf86ConfigError("Elographics device name expected"); - } - local->name = strdup(val->str); - if (xf86Verbose) { - ErrorF("%s Elographics X device name: %s\n", - XCONFIG_GIVEN, local->name); - } - break; - - case SCREEN_NO: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics screen number expected"); - } - priv->screen_no = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics associated screen: %d\n", - XCONFIG_GIVEN, priv->screen_no); - } - break; - - case UNTOUCH_DELAY: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics untouch delay expected"); - } - priv->untouch_delay = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics untouch delay: %d ms\n", - XCONFIG_GIVEN, priv->untouch_delay*10); - } - break; - - case REPORT_DELAY: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics report delay expected"); - } - priv->report_delay = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics report delay: %d ms\n", - XCONFIG_GIVEN, priv->report_delay*10); - } - break; - - case LINK_SPEED: - { - int ltoken = xf86GetToken(LinkSpeedTab); - if (ltoken == EOF || - ltoken == STRING || - ltoken == NUMBER) { - xf86ConfigError("Elographics link speed expected"); - } - priv->link_speed = LinkSpeedValues[ltoken-1].speed; - if (xf86Verbose) { - ErrorF("%s Elographics link speed: %s bps\n", - XCONFIG_GIVEN, (LinkSpeedTab[ltoken-1].name)+1); - } - } - break; - - case MAXX: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics maximum x position expected"); - } - priv->max_x = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics maximum x position: %d\n", - XCONFIG_GIVEN, priv->max_x); - } - break; - - case MAXY: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics maximum y position expected"); - } - priv->max_y = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics maximum y position: %d\n", - XCONFIG_GIVEN, priv->max_y); - } - break; - - case MINX: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics minimum x position expected"); - } - priv->min_x = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics minimum x position: %d\n", - XCONFIG_GIVEN, priv->min_x); - } - break; - - case MINY: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics minimum y position expected"); - } - priv->min_y = val->num; - if (xf86Verbose) { - ErrorF("%s Elographics minimum y position: %d\n", - XCONFIG_GIVEN, priv->min_y); - } - break; - - case DEBUG_LEVEL: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics driver debug level expected"); - } - debug_level = val->num; - if (xf86Verbose) { -#if DEBUG - ErrorF("%s Elographics debug level sets to %d\n", XCONFIG_GIVEN, - debug_level); -#else - ErrorF("%s Elographics debug not available\n", - XCONFIG_GIVEN, debug_level); -#endif - } - break; - - case HISTORY_SIZE: - if (xf86GetToken(NULL) != NUMBER) { - xf86ConfigError("Elographics motion history size expected"); - } - local->history_size = val->num; - if (xf86Verbose) { - ErrorF("%s EloGraphics motion history size is %d\n", XCONFIG_GIVEN, - local->history_size); - } - break; - - case ALWAYS_CORE: - xf86AlwaysCore(local, TRUE); - if (xf86Verbose) { - ErrorF("%s Elographics device will always stays core pointer\n", - XCONFIG_GIVEN); - } - break; - - case SWAP_AXES: - priv->swap_axes = 1; - if (xf86Verbose) { - ErrorF("%s Elographics device will work with X and Y axes swapped\n", - XCONFIG_GIVEN); - } - break; - - case PORTRAIT_MODE: - if (xf86GetToken(NULL) != STRING) { - portrait_mode_err: - xf86ConfigError("Elographics portrait mode should be: Portrait, Landscape or PortraitCCW"); - } - if (strcmp(val->str, "portrait") == 0) { - portrait = 1; - } - else if (strcmp(val->str, "portraitccw") == 0) { - portrait = -1; - } - else if (strcmp(val->str, "landscape") != 0) { - goto portrait_mode_err; - } - if (xf86Verbose) { - ErrorF("%s Elographics device will work in %s mode\n", - XCONFIG_GIVEN, val->str); - } - break; - - case EOF: - FatalError("Unexpected EOF (missing EndSubSection)"); - break; - - default: - xf86ConfigError("Elographics subsection keyword expected"); - break; - } - } - - if (priv->max_x - priv->min_x <= 0) { - ErrorF("%s Elographics: reverse x mode (minimum x position >= maximum x position)\n", - XCONFIG_GIVEN); - } - if (priv->max_y - priv->min_y <= 0) { - ErrorF("%s Elographics: reverse y mode (minimum y position >= maximum y position)\n", - XCONFIG_GIVEN); - } - /* - * The portrait adjustments need to be done after axis reversing - * and axes swap. This way the driver can cope with deffective - * hardware and still do the correct processing depending on the - * actual display orientation. - */ - if (portrait == 1) { - /* - * Portrait Clockwise: reverse Y axis and exchange X and Y. - */ - int tmp; - tmp = priv->min_y; - priv->min_y = priv->max_y; - priv->max_y = tmp; - priv->swap_axes = (priv->swap_axes==0) ? 1 : 0; - } - else if (portrait == -1) { - /* - * Portrait Counter Clockwise: reverse X axis and exchange X and Y. - */ - int tmp; - tmp = priv->min_x; - priv->min_x = priv->max_x; - priv->max_x = tmp; - priv->swap_axes = (priv->swap_axes==0) ? 1 : 0; - } - - DBG(2, ErrorF("xf86EloConfig port name=%s\n", priv->input_dev)) - - return Success; -} -#endif -#endif - - /* *************************************************************************** * @@ -744,14 +351,12 @@ xf86EloConvert(LocalDevicePtr local, * are posted but this method is called FROM xf86PostMotionEvent * Therefore I have moved this method into xf86EloReadInput */ -#ifdef XFREE86_V4 /* * Need to check if still on the correct screen. * This call is here so that this work can be done after * calib and before posting the event. */ /* xf86XInputSetScreen(local, priv->screen_no, *x, *y); */ -#endif DBG(3, ErrorF("EloConvert: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, *x, *y)); @@ -790,7 +395,6 @@ xf86EloReadInput(LocalDevicePtr local) EloPrivatePtr priv = (EloPrivatePtr)(local->private); int cur_x, cur_y; int state; -#ifdef XFREE86_V4 int first = 0; /* since convert is expecting 0 */ int num = 2; /* since convert is expecting 0 */ int v0 = 0; /* = cur_x - based on the debug output this is what v0 is */ @@ -801,7 +405,6 @@ xf86EloReadInput(LocalDevicePtr local) int v5 = 0; /* not used in convert */ int x; /* output */ int y; /* output */ -#endif DBG(4, ErrorF("Entering ReadInput\n")); /* @@ -831,7 +434,6 @@ xf86EloReadInput(LocalDevicePtr local) * are posted but this method is called FROM xf86PostMotionEvent * Therefore I have moved this method into xf86EloReadInput */ -#ifdef XFREE86_V4 /* * Need to check if still on the correct screen. * This call is here so that this work can be done after @@ -849,7 +451,6 @@ xf86EloReadInput(LocalDevicePtr local) DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); xf86XInputSetScreen(local, priv->screen_no, x, y); DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); -#endif /* * Send events. @@ -928,24 +529,6 @@ xf86EloSendPacket(unsigned char *packet, * *************************************************************************** */ -#ifndef XFREE86_V4 -static int -xf86WaitForInput(int fd, - int timeout) -{ - fd_set readfds; - struct timeval to; - int r; - - FD_ZERO(&readfds); - FD_SET(fd, &readfds); - to.tv_sec = 0; - to.tv_usec = timeout; - - SYSCALL(r = select(FD_SETSIZE, &readfds, NULL, NULL, &to)); - return r; -} -#endif static Bool xf86EloWaitReply(unsigned char type, @@ -1093,7 +676,6 @@ static void xf86EloPrintIdent(unsigned char *packet, EloPrivatePtr priv) { -#ifdef XFREE86_V4 xf86Msg(X_PROBED, "Elographics touchscreen is a "); switch(packet[2]) { case '0': @@ -1148,62 +730,6 @@ xf86EloPrintIdent(unsigned char *packet, } xf86Msg(X_NONE, "\n"); } -#else - ErrorF("%s Elographics touchscreen is a ", XCONFIG_PROBED); - switch(packet[2]) { - case '0': - ErrorF("AccuTouch"); - break; - case '1': - ErrorF("DuraTouch"); - break; - case '2': - ErrorF("Intellitouch"); - break; - } - ErrorF(", connected through a "); - switch(packet[3]) { - case '0': - ErrorF("serial link.\n"); - break; - case '1': - ErrorF("PC-Bus port.\n"); - break; - case '2': - ErrorF("Micro Channel port.\n"); - break; - } - ErrorF("%s The controller is a model ", XCONFIG_PROBED); - if (packet[8] & 1) { - if (priv->is_a_2310) { - ErrorF("E281-2310"); - } - else { - ErrorF("E271-2210"); - } - } - else { - ErrorF("E271-2200"); - } - ErrorF(", firmware revision %d.%d.\n", packet[6], packet[5]); - - if (packet[4]) { - ErrorF("%s Additional features:\n", XCONFIG_PROBED); - if (packet[4] & 0x10) { - ErrorF("%s External A/D converter\n", XCONFIG_PROBED); - } - if (packet[4] & 0x20) { - ErrorF("%s 32Ko RAM\n", XCONFIG_PROBED); - } - if (packet[4] & 0x40) { - ErrorF("%s RAM onboard\n", XCONFIG_PROBED); -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org