home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1990, 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #ifndef SUMMA_H
- #define SUMMA_H 1
-
- #define SUMMA_NAME "tablet"
- #define SUMMA_TYPE "TABLET"
- #define SUMMA_NUM_BUTTONS 5
- #define SUMMA_ALL_BUTTONS 0x1f
-
- #define SUMMA_NUM_VALUATORS 2
- #define SUMMA_NUM_AXES 2
- #define SUMMA_X_VALUATOR_MIN 0
- #define SUMMA_X_VALUATOR_MAX 6000
- #define SUMMA_Y_VALUATOR_MIN 0
- #define SUMMA_Y_VALUATOR_MAX 9000
- #define SUMMA_VALUATOR_RESOLUTION 1000
- #define SUMMA_VALUATOR_MIN_RESOLUTION 1
- #define SUMMA_VALUATOR_MAX_RESOLUTION 1000
- #define SUMMA_ALL_VALUATORS 0x3
-
- #define SUMMA_PHASE_BIT 0x80
- #define SUMMA_NOT_SYNCHED -1
-
- #define SUMMA_REGULAR_DATA 0
- #define SUMMA_DELTA_DATA 1
- #define SUMMA_CONFIG_INFO 2
- #define SUMMA_TEST_RESULTS 3
- #define SUMMA_CHECKSUM 4
-
- /* The following define names for the bytes in the data coming
- from the tablet. (i.e. Byte 0 is flag information) */
- #define SUMMA_FLAGS 0
- #define SUMMA_LOW_X 1
- #define SUMMA_HIGH_X 2
- #define SUMMA_LOW_Y 3
- #define SUMMA_HIGH_Y 4
-
- /* The following are define names for commands that can be sent
- to the Summagraphics tablet */
-
- #define SUMMA_ORIGIN_UPPER 'b'
- #define SUMMA_ORIGIN_LOWER 'c'
- #define SUMMA_AXIS_UPDATE 'G'
- #define SUMMA_INCREMENT 'I'
- #define SUMMA_ABSOLUTE 'F'
- #define SUMMA_RELATIVE 'E'
- #define SUMMA_RPT_POINT 'B'
- #define SUMMA_RPT_REM_MODE 'D'
- #define SUMMA_RPT_REM_TRIG 'P'
- #define SUMMA_RPT_STREAM '@'
- #define SUMMA_RPT_SW_STREAM 'A'
- #define SUMMA_RATE_MAX 'Q'
- #define SUMMA_RATE_MAX_2 'R'
- #define SUMMA_RATE_MAX_8 'S'
- #define SUMMA_RATE_MAX_32 'T'
- #define SUMMA_RESET '\000'
- #define SUMMA_RESOLUTION 'r'
- #define SUMMA_RES_1LPI 'l'
- #define SUMMA_RES_2LPI 'n'
- #define SUMMA_RES_4LPI 'p'
- #define SUMMA_RES_100LPI 'd'
- #define SUMMA_RES_200LPI 'e'
- #define SUMMA_RES_400LPI 'g'
- #define SUMMA_RES_500LPI 'h'
- #define SUMMA_RES_1000LPI 'j'
- #define SUMMA_RES_10LPMM 'f'
- #define SUMMA_RES_20LPMM 'i'
- #define SUMMA_RES_40LPMM 'q'
- #define SUMMA_XON '\021'
- #define SUMMA_XOFF '\023'
- #define SUMMA_MODEL_ID '\005'
- #define SUMMA_SELFTEST 't'
- #define SUMMA_SEND_RESULTS 'w'
- #define SUMMA_ECHO 'k'
- #define SUMMA_CODECHECK 'x'
- #define SUMMA_GET_CONFIG 'a'
- #define SUMMA_READ_CONFIG 'Y'
- #define SUMMA_0 '0'
- #define SUMMA_1 '1'
-
-
- #ifdef _KERNEL
- typedef struct sum_state {
- idevInfo info;
-
- idevValuatorDesc vdesc[SUMMA_NUM_VALUATORS];
- idevTransform vtrans[SUMMA_NUM_VALUATORS];
-
- unsigned char vactive;
- int vstate[SUMMA_NUM_VALUATORS];
-
- unsigned char bactive;
- unsigned char bstate;
-
- int state;
- idevValuatorState vals;
-
- char flags;
- char origin;
- char resolution;
- char primary_mode;
- char mode_modifier;
- int data;
- int x_resolution;
- int y_resolution;
- int model;
- int xoffset;
- int yoffset;
-
-
- /* Misc. Std. Driver stuff */
- unsigned char initialized;/* true if data structures are set */
- /* and init sequence has been sent to */
- /* device */
- unsigned char ready; /* true if we've received confirmation */
- /* of the init sequence from the device */
- } sum_state_t;
-
- #endif /* _KERNEL */
-
- #endif
-