1*34544Smarc /* 2*34544Smarc * Copyright (c) 1982, 1986 Regents of the University of California. 3*34544Smarc * All rights reserved. The Berkeley software License Agreement 4*34544Smarc * specifies the terms and conditions for redistribution. 5*34544Smarc * 6*34544Smarc * @(#)qduser.h 1.3 Berkeley 05/27/88 7*34544Smarc */ 831808Smarc /************************************************************************ 931808Smarc * * 1031808Smarc * Copyright (c) 1986 by * 1131808Smarc * Digital Equipment Corporation, Maynard, MA * 1231808Smarc * All rights reserved. * 1331808Smarc * * 1431808Smarc * This software is furnished under a license and may be used and * 1531808Smarc * copied only in accordance with the terms of such license and * 1631808Smarc * with the inclusion of the above copyright notice. This * 1731808Smarc * software or any other copies thereof may not be provided or * 1831808Smarc * otherwise made available to any other person. No title to and * 1931808Smarc * ownership of the software is hereby transferred. * 2031808Smarc * * 2131808Smarc * The information in this software is subject to change without * 2231808Smarc * notice and should not be construed as a commitment by Digital * 2331808Smarc * Equipment Corporation. * 2431808Smarc * * 2531808Smarc * Digital assumes no responsibility for the use or reliability * 2631808Smarc * of its software on equipment which is not supplied by Digital. * 2731808Smarc * * 2831808Smarc ************************************************************************/ 2931808Smarc 3031808Smarc /*************************************************************************** 3131808Smarc * 3231808Smarc * QDUSER... 3331808Smarc * This file defines values shared between the driver and a client 3431808Smarc * 3531808Smarc ***************************************************************************/ 3631808Smarc 3731808Smarc /*************************************************************************** 38*34544Smarc * revision history: (belongs in sccs) 3931808Smarc **************************************************************************** 4031808Smarc * 4131808Smarc * 21 jul 86 ram fixed define of CURSOR_MIN_Y 4231808Smarc * 25 nov 85 longo added macro and bit defines for DMA error flags 4331808Smarc * 11 nov 85 longo renamed _vs_eventqueue to "qdinput" struct 4431808Smarc * 23 oct 85 longo added more defines to the DMA stuff 4531808Smarc * 17 oct 85 longo changed "struct rgb" chars to be unsigned 4631808Smarc * 16 oct 85 longo added new TABLET support definitions 4731808Smarc * 15 oct 85 longo re-wrote DMA queue access macros 4831808Smarc * 08 oct 85 longo added status flag manipulation macros to DMA stuff 4931808Smarc * 02 oct 85 longo added support for color map write buffer loading 5031808Smarc * 26 sep 85 longo removed adder sertup params from DMA request struct 5131808Smarc * 23 sep 85 longo added DMA queue access macros 5231808Smarc * 30 aug 85 longo fixed crock in "qdiobuf" struct compile-time sizing. Also 5331808Smarc * removed DMAcontrol struct from DMA buffer for field test 5431808Smarc * 26 aug 85 longo put in conditional include of "qevent.h" for user prg's 5531808Smarc * 18 jul 85 longo changed semantics so that head is tail and tail is head 5631808Smarc * 12 jul 85 longo moved "mouse_report" struct and defs over to qd_data.c 5731808Smarc * 11 jul 85 longo added device coordinate to gate array cursor coordinate 5831808Smarc * transformation macros 5931808Smarc * 03 jul 85 longo changed kernel typdef's for data types to long-hand 6031808Smarc * 10 may 85 longo created 6131808Smarc * 6231808Smarc ***************************************************************************/ 6331808Smarc 6431808Smarc #ifdef KERNEL 6532013Smarc #include "qevent.h" /* include event struct defs */ 6631808Smarc #else 6731808Smarc #include <vaxuba/qevent.h> 6831808Smarc #endif 6931808Smarc 7031808Smarc /*--------------------- 7131808Smarc * QDSS device map */ 7231808Smarc 7331808Smarc struct qdmap { /* map of register blocks in QDSS */ 7431808Smarc 7531808Smarc char *template; 7631808Smarc char *adder; 7731808Smarc char *dga; 7831808Smarc char *duart; 7931808Smarc char *memcsr; 8031808Smarc char *red; 8131808Smarc char *blue; 8231808Smarc char *green; 8331808Smarc }; 8431808Smarc 8531808Smarc /*-------------------------------------------- 8631808Smarc * DGA CSR bit definitions and register map */ 8731808Smarc 8831808Smarc #define DMADONE 0x8000 /* DMA done status */ 8931808Smarc #define SET_DONE_FIFO 0x4000 /* set DMADONE when FIFO empty.. */ 9031808Smarc /* ..AND count = 0 */ 9131808Smarc 9231808Smarc #define PTOB_ENB 0x0600 /* host-to-bitmap DMA xfer */ 9331808Smarc #define BTOP_ENB 0x0400 /* bitmap-to-host DMA xfer */ 9431808Smarc #define DL_ENB 0x0200 /* display list DMA xfer */ 9531808Smarc #define HALT 0x0000 /* halt DGA */ 9631808Smarc 9731808Smarc #define BYTE_DMA 0x0100 /* byte/word DMA xfer */ 9831808Smarc 9931808Smarc #define DMA_ERR 0x0080 /* DMA error bits */ 10031808Smarc #define PARITY_ERR 0x0040 /* memory parity error in DMA */ 10131808Smarc #define BUS_ERR 0x0020 /* bus timeout error in DMA */ 10231808Smarc 10331808Smarc #define GLOBAL_IE 0x0004 /* global interrupt enable */ 10431808Smarc #define DMA_IE 0x0002 /* DMA interrupt enable */ 10531808Smarc #define CURS_ENB 0x0001 /* cursor enable */ 10631808Smarc 10731808Smarc /* QDSS memcsr bit definitions */ 10831808Smarc 10931808Smarc #define UNBLANK 0x0020 11031808Smarc #define SYNC_ON 0x0008 11131808Smarc 11231808Smarc struct dga { 11331808Smarc 11431808Smarc unsigned short csr; 11531808Smarc unsigned short adrs_lo; /* destination address of bitmap to */ 11631808Smarc unsigned short adrs_hi; /* host DMA */ 11731808Smarc unsigned short bytcnt_lo; /* byte length of requested DMA */ 11831808Smarc unsigned short bytcnt_hi; /* (WO = bytcnt) (RO = fifo count) */ 11931808Smarc unsigned short fifo; /* FIFO register */ 12031808Smarc unsigned short x_cursor; /* cursor position registers */ 12131808Smarc unsigned short y_cursor; 12231808Smarc unsigned short ivr; /* interrupt vector register */ 12331808Smarc unsigned short memadr; /* memory base address register */ 12431808Smarc }; 12531808Smarc 12631808Smarc /*------------------------------------------------------------------------- 12731808Smarc * macros to transform device coordinates to hardware cursor coordinates */ 12831808Smarc 12931808Smarc #define CURS_MIN_X 232 /* device coordinate x = 0 */ 13031808Smarc #define CURS_MIN_Y 16 /* device coordinate y = 0 */ 13131808Smarc 13231808Smarc #define TRANX(x) ( -(((int)(x)+CURS_MIN_X) & ~0x0003) | \ 13331808Smarc (((int)(x)+CURS_MIN_X) & 0x0003) ) 13431808Smarc 13531808Smarc #define TRANY(y) ( -((y)+CURS_MIN_Y) ) 13631808Smarc 13731808Smarc /********************************************************************* 13831808Smarc * 13931808Smarc * EVENT QUEUE DEFINITIONS 14031808Smarc * 14131808Smarc ********************************************************************** 14231808Smarc * most of the event queue definitions are found in "qevent.h". But a 14331808Smarc * few things not found there are here. */ 14431808Smarc 14531808Smarc /* The event queue header */ 14631808Smarc 14731808Smarc typedef struct qdinput { 14831808Smarc 14931808Smarc struct _vs_eventqueue header; /* event queue ring handling */ 15031808Smarc 15131808Smarc /* for VS100 and QVSS compatability reasons, additions to this 15231808Smarc * structure must be made below this point. */ 15331808Smarc 15431808Smarc struct _vs_cursor curs_pos; /* current mouse position */ 15531808Smarc struct _vs_box curs_box; /* cursor reporting box */ 15631808Smarc 15731808Smarc }; 15831808Smarc 15931808Smarc /* vse_key field. definitions for mouse buttons */ 16031808Smarc 16131808Smarc #define VSE_LEFT_BUTTON 0 16231808Smarc #define VSE_MIDDLE_BUTTON 1 16331808Smarc #define VSE_RIGHT_BUTTON 2 16431808Smarc 16531808Smarc /* vse_key field. definitions for mouse buttons */ 16631808Smarc 16731808Smarc #define VSE_T_LEFT_BUTTON 0 16831808Smarc #define VSE_T_FRONT_BUTTON 1 16931808Smarc #define VSE_T_RIGHT_BUTTON 2 17031808Smarc #define VSE_T_BACK_BUTTON 4 17131808Smarc 17231808Smarc #define VSE_T_BARREL_BUTTON VSE_T_LEFT_BUTTON 17331808Smarc #define VSE_T_TIP_BUTTON VSE_T_FRONT_BUTTON 17431808Smarc 17531808Smarc /*-------------------------------------------------------------------------- 17631808Smarc * These are the macros to be used for loading and extracting from the event 17731808Smarc * queue. It is presumed that the macro user will only use the access macros 17831808Smarc * if the event queue is non-empty ( ISEMPTY(eq) == FALSE ), and that the 17931808Smarc * driver will only load the event queue after checking that it is not full 18031808Smarc * ( ISFULL(eq) == FALSE ). ("eq" is a pointer to the event queue header.) 18131808Smarc * 18231808Smarc * Before an event access session for a particular event, the macro users 18331808Smarc * must use the xxxBEGIN macro, and the xxxEND macro after an event is through 18431808Smarc * with. As seen below, the xxxBEGIN and xxxEND macros maintain the event 18531808Smarc * queue access mechanism. 18631808Smarc * 18731808Smarc * First, the macros to be used by the event queue reader 18831808Smarc */ 18931808Smarc 19031808Smarc #define ISEMPTY(eq) ((eq)->header.head == (eq)->header.tail) 19131808Smarc #define GETBEGIN(eq) (&(eq)->header.events[(eq)->header.head]) 19231808Smarc 19331808Smarc #define GET_X(event) ((event)->vse_x) /* get x position */ 19431808Smarc #define GET_Y(event) ((event)->vse_y) /* get y position */ 19531808Smarc #define GET_TIME(event) ((event)->vse_time) /* get time */ 19631808Smarc #define GET_TYPE(event) ((event)->vse_type) /* get entry type */ 19731808Smarc #define GET_KEY(event) ((event)->vse_key) /* get keycode */ 19831808Smarc #define GET_DIR(event) ((event)->vse_direction) /* get direction */ 19931808Smarc #define GET_DEVICE(event) ((event)->vse_device) /* get device */ 20031808Smarc 20131808Smarc #define GETEND(eq) (++(eq)->header.head >= (eq)->header.size ? \ 20231808Smarc (eq)->header.head = 0 : 0 ) 20331808Smarc 20431808Smarc /*------------------------------------------------ 20531808Smarc * macros to be used by the event queue loader */ 20631808Smarc 20731808Smarc /* ISFULL yields TRUE if queue is full */ 20831808Smarc 20931808Smarc #define ISFULL(eq) ((eq)->header.tail+1 == (eq)->header.head || \ 21031808Smarc ((eq)->header.tail+1 == (eq)->header.size && \ 21131808Smarc (eq)->header.head == 0)) 21231808Smarc 21331808Smarc /* get address of the billet for NEXT event */ 21431808Smarc 21531808Smarc #define PUTBEGIN(eq) (&(eq)->header.events[(eq)->header.tail]) 21631808Smarc 21731808Smarc #define PUT_X(event, value) ((event)->vse_x = value) /* put X pos */ 21831808Smarc #define PUT_Y(event, value) ((event)->vse_y = value) /* put Y pos */ 21931808Smarc #define PUT_TIME(event, value) ((event)->vse_time = value) /* put time */ 22031808Smarc #define PUT_TYPE(event, value) ((event)->vse_type = value) /* put type */ 22131808Smarc #define PUT_KEY(event, value) ((event)->vse_key = value) /* put input key */ 22231808Smarc #define PUT_DIR(event, value) ((event)->vse_direction = value) /* put dir */ 22331808Smarc #define PUT_DEVICE(event, value) ((event)->vse_device = value) /* put dev */ 22431808Smarc 22531808Smarc #define PUTEND(eq) (++(eq)->header.tail >= (eq)->header.size ? \ 22631808Smarc (eq)->header.tail = 0 : 0) 22731808Smarc 22831808Smarc /****************************************************************** 22931808Smarc * 23031808Smarc * DMA I/O DEFINITIONS 23131808Smarc * 23231808Smarc ******************************************************************/ 23331808Smarc 23431808Smarc /*--------------------------------------------------------------------- 23531808Smarc * The DMA request queue is implemented as a ring buffer of "DMAreq" 23631808Smarc structures. The queue is accessed using ring indices located in the 23731808Smarc "DMAreq_header" structure. Access is implemented using access macros 23831808Smarc similar to the event queue access macros above. */ 23931808Smarc 24031808Smarc struct DMAreq { 24131808Smarc 24231808Smarc short DMAtype; /* DMA type code (for QDSS) */ 24331808Smarc short DMAdone; /* DMA done parameter */ 24431808Smarc char *bufp; /* virtual adrs of buffer */ 24531808Smarc int length; /* transfer buffer length */ 24631808Smarc }; 24731808Smarc 24831808Smarc /* DMA type command codes */ 24931808Smarc 25031808Smarc #define DISPLIST 1 /* display list DMA */ 25131808Smarc #define PTOB 2 /* 1 plane Qbus to bitmap DMA */ 25231808Smarc #define BTOP 3 /* 1 plane bitmap to Qbus DMA */ 25331808Smarc 25431808Smarc /* DMA done notification code */ 25531808Smarc 25631808Smarc #define FIFO_EMPTY 0x01 /* DONE when FIFO becomes empty */ 25731808Smarc #define COUNT_ZERO 0x02 /* DONE when count becomes zero */ 25831808Smarc #define WORD_PACK 0x04 /* program the gate array for word packing */ 25931808Smarc #define BYTE_PACK 0x08 /* program gate array for byte packing */ 26031808Smarc #define REQUEST_DONE 0x100 /* clear when driver has processed request */ 26131808Smarc #define HARD_ERROR 0x200 /* DMA hardware error occurred */ 26231808Smarc 26331808Smarc /* DMA request queue is a ring buffer of request structures */ 26431808Smarc 26531808Smarc struct DMAreq_header { 26631808Smarc 26731808Smarc int QBAreg; /* cookie Qbus map reg for this buffer */ 26831808Smarc short status; /* master DMA status word */ 26931808Smarc int shared_size; /* size of shared memory in bytes */ 27031808Smarc struct DMAreq *DMAreq; /* start address of request queue */ 27131808Smarc int used; /* # of queue entries currently used */ 27231808Smarc int size; /* # of "DMAreq"'s in the request queue */ 27331808Smarc int oldest; /* index to oldest queue'd request */ 27431808Smarc int newest; /* index to newest queue'd request */ 27531808Smarc }; 27631808Smarc 27731808Smarc /* bit definitions for DMAstatus word in DMAreq_header */ 27831808Smarc 27931808Smarc #define DMA_ACTIVE 0x0004 /* DMA in progress */ 28031808Smarc #define DMA_ERROR 0x0080 /* DMA hardware error */ 28131808Smarc #define DMA_IGNORE 0x0002 /* flag to ignore this interrupt */ 28231808Smarc 28331808Smarc /*------------------------------------------ 28431808Smarc * macros for DMA request queue fiddling */ 28531808Smarc 28631808Smarc /* DMA status set/check macros */ 28731808Smarc 28831808Smarc #define DMA_SETACTIVE(header) ((header)->status |= DMA_ACTIVE) 28931808Smarc #define DMA_CLRACTIVE(header) ((header)->status &= ~DMA_ACTIVE) 29031808Smarc #define DMA_ISACTIVE(header) ((header)->status & DMA_ACTIVE) 29131808Smarc 29231808Smarc #define DMA_SETERROR(header) ((header)->status |= DMA_ERROR) 29331808Smarc #define DMA_CLRERROR(header) ((header)->status &= ~DMA_ERROR) 29431808Smarc #define DMA_ISERROR(header) ((header)->status & DMA_ERROR) 29531808Smarc 29631808Smarc #define DMA_SETIGNORE(header) ((header)->status |= DMA_IGNORE) 29731808Smarc #define DMA_CLRIGNORE(header) ((header)->status &= ~DMA_IGNORE) 29831808Smarc #define DMA_ISIGNORE(header) ((header)->status & DMA_IGNORE) 29931808Smarc 30031808Smarc /* yields TRUE if queue is empty (ISEMPTY) or full (ISFULL) */ 30131808Smarc 30231808Smarc #define DMA_ISEMPTY(header) ((header)->used == 0) 30331808Smarc #define DMA_ISFULL(header) ((header)->used >= (header)->size) 30431808Smarc 30531808Smarc /* returns address of the billet for next (PUT) 30631808Smarc * or oldest (GET) request */ 30731808Smarc 30831808Smarc #define DMA_PUTBEGIN(header) (&(header)->DMAreq[(header)->newest]) 30931808Smarc #define DMA_GETBEGIN(header) (&(header)->DMAreq[(header)->oldest]) 31031808Smarc 31131808Smarc /* does queue access pointer maintenance */ 31231808Smarc 31331808Smarc #define DMA_GETEND(header) (++(header)->oldest >= (header)->size \ 31431808Smarc ? (header)->oldest = 0 : 0); \ 31531808Smarc --(header)->used; 31631808Smarc 31731808Smarc #define DMA_PUTEND(header) (++(header)->newest >= (header)->size \ 31831808Smarc ? (header)->newest = 0 : 0); \ 31931808Smarc ++(header)->used; 32031808Smarc 32131808Smarc /****************************************************************** 32231808Smarc * 32331808Smarc * COLOR MAP WRITE BUFFER DEFINITIONS 32431808Smarc * 32531808Smarc ******************************************************************/ 32631808Smarc 32731808Smarc struct rgb { 32831808Smarc 32931808Smarc unsigned char offset; /* color map address for load */ 33031808Smarc unsigned char red; /* data for red map */ 33131808Smarc unsigned char green; /* data for green map */ 33231808Smarc unsigned char blue; /* data for blue map */ 33331808Smarc }; 33431808Smarc 33531808Smarc struct color_buf { 33631808Smarc 33731808Smarc char status; /* load request/service status */ 33831808Smarc short count; /* number of entries to br loaded */ 33931808Smarc struct rgb rgb[256]; 34031808Smarc }; 34131808Smarc 34231808Smarc #define LOAD_COLOR_MAP 0x0001 34331808Smarc 34431808Smarc /****************************************************************** 34531808Smarc * 34631808Smarc * SCROLL ASSIST DEFINITIONS 34731808Smarc * 34831808Smarc ******************************************************************/ 34931808Smarc 35031808Smarc struct scroll { 35131808Smarc 35231808Smarc short status; 35331808Smarc short viper_constant; 35431808Smarc short y_scroll_constant; 35531808Smarc short y_offset; 35631808Smarc short x_index_pending; 35731808Smarc short y_index_pending; 35831808Smarc }; 35931808Smarc 36031808Smarc #define LOAD_REGS 0x0001 36131808Smarc #define LOAD_INDEX 0x0002 36231808Smarc 36331808Smarc /****************************************************************** 36431808Smarc * 36531808Smarc * MOUSE/TABLET/KBD PROGRAMMING DEFINITIONS 36631808Smarc * 36731808Smarc ******************************************************************/ 36831808Smarc 36931808Smarc /*----------------------------------- 37031808Smarc * LK201 programmming definitions */ 37131808Smarc 37231808Smarc #define LK_UPDOWN 0x86 /* bits for setting lk201 modes */ 37331808Smarc #define LK_AUTODOWN 0x82 37431808Smarc #define LK_DOWN 0x80 37531808Smarc #define LK_DEFAULTS 0xD3 /* reset (some) default settings */ 37631808Smarc #define LK_AR_ENABLE 0xE3 /* global auto repeat enable */ 37731808Smarc #define LK_CL_ENABLE 0x1B /* keyclick enable */ 37831808Smarc #define LK_KBD_ENABLE 0x8B /* keyboard enable */ 37931808Smarc #define LK_BELL_ENABLE 0x23 /* the bell */ 38031808Smarc #define LK_RING_BELL 0xA7 /* ring keyboard bell */ 38131808Smarc 38231808Smarc #define LK_LED_ENABLE 0x13 /* light led */ 38331808Smarc #define LK_LED_DISABLE 0x11 /* turn off led */ 38431808Smarc #define LED_1 0x81 /* led bits */ 38531808Smarc #define LED_2 0x82 38631808Smarc #define LED_3 0x84 38731808Smarc #define LED_4 0x88 38831808Smarc #define LED_ALL 0x8F 38931808Smarc #define LK_LED_HOLD LED_4 39031808Smarc #define LK_LED_LOCK LED_3 39131808Smarc #define LK_LED_COMPOSE LED_2 39231808Smarc #define LK_LED_WAIT LED_1 39331808Smarc 39431808Smarc #define LK_KDOWN_ERROR 0x3D /* key down on powerup error */ 39531808Smarc #define LK_POWER_ERROR 0x3E /* keyboard failure on powerup test */ 39631808Smarc #define LK_OUTPUT_ERROR 0xB5 /* keystrokes lost during inhibit */ 39731808Smarc #define LK_INPUT_ERROR 0xB6 /* garbage command to keyboard */ 39831808Smarc #define LK_LOWEST 0x56 /* lowest significant keycode */ 39931808Smarc #define LK_DIV6_START 0xAD /* start of div 6 */ 40031808Smarc #define LK_DIV5_END 0xB2 /* end of div 5 */ 40131808Smarc 40231808Smarc #define LAST_PARAM 0x80 /* "no more params" bit */ 40331808Smarc 40431808Smarc struct prgkbd { 40531808Smarc 40631808Smarc short cmd; /* LK201 command opcode */ 40731808Smarc short param1; /* 1st cmd parameter (can be null) */ 40831808Smarc short param2; /* 2nd cmd parameter (can be null) */ 40931808Smarc }; 41031808Smarc 41131808Smarc /*------------------------- 41231808Smarc * "special" LK-201 keys */ 41331808Smarc 41431808Smarc #define SHIFT 174 41531808Smarc #define LOCK 176 41631808Smarc #define REPEAT 180 41731808Smarc #define CNTRL 175 41831808Smarc #define ALLUP 179 41931808Smarc 42031808Smarc /*-------------------------------- 42131808Smarc * cursor programming structure */ 42231808Smarc 42331808Smarc struct prg_cursor { 42431808Smarc 42531808Smarc unsigned short acc_factor; /* cursor aceleration factor */ 42631808Smarc unsigned short threshold; /* threshold to trigger acc at */ 42731808Smarc }; 42831808Smarc 42931808Smarc /*--------------------- 43031808Smarc * mouse definitions */ 43131808Smarc 43231808Smarc #define INC_STREAM_MODE 'R' /* stream mode reports (55 hz) */ 43331808Smarc #define PROMPT_MODE 'D' /* report when prompted */ 43431808Smarc #define REQUEST_POS 'P' /* request position report */ 43531808Smarc #define SELF_TEST 'T' /* request self test */ 43631808Smarc 43731808Smarc #define MOUSE_ID 0x2 /* mouse ID in lo 4 bits */ 43831808Smarc 43931808Smarc #define START_FRAME 0x80 /* start of report frame bit */ 44031808Smarc #define X_SIGN 0x10 /* position sign bits */ 44131808Smarc #define Y_SIGN 0x08 44231808Smarc 44331808Smarc #define RIGHT_BUTTON 0x01 /* mouse buttons */ 44431808Smarc #define MIDDLE_BUTTON 0x02 44531808Smarc #define LEFT_BUTTON 0x04 44631808Smarc 44731808Smarc /* mouse report structure definition */ 44831808Smarc 44931808Smarc struct mouse_report { 45031808Smarc 45131808Smarc char state; /* buttons and sign bits */ 45231808Smarc short dx; /* delta X since last change */ 45331808Smarc short dy; /* delta Y since last change */ 45431808Smarc char bytcnt; /* mouse report byte count */ 45531808Smarc }; 45631808Smarc 45731808Smarc /*----------------------------------------- 45831808Smarc * tablet command/interface definitions */ 45931808Smarc 46031808Smarc #define T_STREAM 'R' /* continuous stream report mode */ 46131808Smarc #define T_POINT 'D' /* enter report-on-request mode */ 46231808Smarc #define T_REQUEST 'P' /* request position report */ 46331808Smarc 46431808Smarc #define T_BAUD 'B' /* increase baud to 9600 from 4800 */ 46531808Smarc #define T_RATE_55 'K' /* report rate: 55/sec */ 46631808Smarc #define T_RATE_72 'L' /* report rate: 72/sec */ 46731808Smarc #define T_RATE_120 'M' /* report rate: 120/sec (9600 only) */ 46831808Smarc 46931808Smarc #define T_TEST SELF_TEST /* do self test */ 47031808Smarc 47131808Smarc #define TABLET_ID 0x4 /* tablet ID in lo 4 bits */ 47231808Smarc 47331808Smarc #define T_START_FRAME 0x80 /* start of report frame bit */ 47431808Smarc #define T_PROXIMITY 0x01 /* state pointer in proximity */ 47531808Smarc 47631808Smarc #define T_LEFT_BUTTON 0x02 /* puck buttons */ 47731808Smarc #define T_FRONT_BUTTON 0x04 47831808Smarc #define T_RIGHT_BUTTON 0x08 47931808Smarc #define T_BACK_BUTTON 0x10 48031808Smarc 48131808Smarc #define T_BARREL_BUTTON T_LEFT_BUTTON /* stylus buttons */ 48231808Smarc #define T_TIP_BUTTON T_FRONT_BUTTON 48331808Smarc 484