home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / hardware / summa / sys / summa.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  4.0 KB  |  137 lines

  1. /*
  2.  * Copyright (C) 1990, 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef SUMMA_H
  18. #define SUMMA_H 1
  19.  
  20. #define    SUMMA_NAME        "tablet"
  21. #define    SUMMA_TYPE        "TABLET"
  22. #define    SUMMA_NUM_BUTTONS    5
  23. #define    SUMMA_ALL_BUTTONS    0x1f
  24.  
  25. #define    SUMMA_NUM_VALUATORS    2
  26. #define SUMMA_NUM_AXES          2
  27. #define SUMMA_X_VALUATOR_MIN    0
  28. #define SUMMA_X_VALUATOR_MAX    6000
  29. #define SUMMA_Y_VALUATOR_MIN    0
  30. #define SUMMA_Y_VALUATOR_MAX    9000
  31. #define    SUMMA_VALUATOR_RESOLUTION        1000
  32. #define    SUMMA_VALUATOR_MIN_RESOLUTION    1
  33. #define    SUMMA_VALUATOR_MAX_RESOLUTION    1000
  34. #define    SUMMA_ALL_VALUATORS    0x3
  35.  
  36. #define    SUMMA_PHASE_BIT        0x80
  37. #define    SUMMA_NOT_SYNCHED    -1
  38.  
  39. #define SUMMA_REGULAR_DATA    0
  40. #define SUMMA_DELTA_DATA    1
  41. #define SUMMA_CONFIG_INFO    2
  42. #define SUMMA_TEST_RESULTS    3
  43. #define SUMMA_CHECKSUM        4
  44.  
  45. /* The following define names for the bytes in the data coming
  46.    from the tablet.  (i.e. Byte 0 is flag information)         */
  47. #define SUMMA_FLAGS        0
  48. #define    SUMMA_LOW_X        1
  49. #define    SUMMA_HIGH_X        2
  50. #define    SUMMA_LOW_Y        3
  51. #define    SUMMA_HIGH_Y        4
  52.  
  53. /* The following are define names for commands that can be sent
  54.    to the Summagraphics tablet   */
  55.  
  56. #define SUMMA_ORIGIN_UPPER      'b'
  57. #define SUMMA_ORIGIN_LOWER      'c'
  58. #define SUMMA_AXIS_UPDATE       'G'
  59. #define SUMMA_INCREMENT         'I'
  60. #define SUMMA_ABSOLUTE          'F'
  61. #define SUMMA_RELATIVE          'E'
  62. #define SUMMA_RPT_POINT         'B'
  63. #define SUMMA_RPT_REM_MODE      'D'
  64. #define SUMMA_RPT_REM_TRIG      'P'
  65. #define SUMMA_RPT_STREAM        '@'
  66. #define SUMMA_RPT_SW_STREAM     'A'
  67. #define SUMMA_RATE_MAX          'Q'
  68. #define SUMMA_RATE_MAX_2        'R'
  69. #define SUMMA_RATE_MAX_8        'S'
  70. #define SUMMA_RATE_MAX_32       'T'
  71. #define SUMMA_RESET             '\000'
  72. #define SUMMA_RESOLUTION        'r'
  73. #define SUMMA_RES_1LPI          'l'
  74. #define SUMMA_RES_2LPI          'n'
  75. #define SUMMA_RES_4LPI          'p'
  76. #define SUMMA_RES_100LPI        'd'
  77. #define SUMMA_RES_200LPI        'e'
  78. #define SUMMA_RES_400LPI        'g'
  79. #define SUMMA_RES_500LPI        'h'
  80. #define SUMMA_RES_1000LPI       'j'
  81. #define SUMMA_RES_10LPMM        'f'
  82. #define SUMMA_RES_20LPMM        'i'
  83. #define SUMMA_RES_40LPMM        'q'
  84. #define SUMMA_XON               '\021'
  85. #define SUMMA_XOFF              '\023'
  86. #define SUMMA_MODEL_ID          '\005'
  87. #define SUMMA_SELFTEST        't'
  88. #define SUMMA_SEND_RESULTS      'w'
  89. #define SUMMA_ECHO        'k'
  90. #define SUMMA_CODECHECK        'x'
  91. #define SUMMA_GET_CONFIG    'a'
  92. #define SUMMA_READ_CONFIG    'Y'
  93. #define SUMMA_0                 '0'
  94. #define SUMMA_1                 '1'
  95.  
  96.  
  97. #ifdef _KERNEL
  98. typedef struct sum_state {
  99.     idevInfo        info;
  100.  
  101.     idevValuatorDesc    vdesc[SUMMA_NUM_VALUATORS];
  102.     idevTransform        vtrans[SUMMA_NUM_VALUATORS];
  103.  
  104.     unsigned char        vactive;
  105.     int            vstate[SUMMA_NUM_VALUATORS];
  106.  
  107.     unsigned char        bactive;
  108.     unsigned char        bstate;
  109.  
  110.     int            state;
  111.     idevValuatorState    vals;
  112.  
  113.         char                    flags;
  114.         char                    origin;
  115.         char                    resolution;
  116.     char            primary_mode;
  117.     char            mode_modifier;
  118.     int            data;
  119.     int            x_resolution;
  120.     int            y_resolution;
  121.         int                     model;
  122.     int            xoffset;
  123.     int            yoffset;
  124.  
  125.  
  126.     /* Misc. Std. Driver stuff */
  127.     unsigned char initialized;/* true if data structures are set */
  128.                 /* and init sequence has been sent to */
  129.                 /* device */
  130.     unsigned char ready;    /* true if we've received confirmation */
  131.                 /* of the init sequence from the device */
  132. } sum_state_t;
  133.  
  134. #endif /* _KERNEL */
  135.  
  136. #endif
  137.