~ubuntu-branches/ubuntu/breezy/xfree86-driver-synaptics/breezy

« back to all changes in this revision

Viewing changes to ps2comm.c

  • Committer: Bazaar Package Importer
  • Author(s): Mattia Dongili (ma.d.)
  • Date: 2004-12-18 20:07:15 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041218200715-p5y2c27b63vszun1
Tags: 0.13.6-2
* Install in /usr/X11R6/lib as all the xfree drivers on 64 bit archs.  (closes: #280658)
* Provided an alternative patch for debian-kernel users. (closes: #282359)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#define MAX_UNSYNC_PACKETS 10                           /* i.e. 10 to 60 bytes */
34
34
 
35
 
/* acknowledge for commands and parameter */
36
 
#define PS2_ACK                         0xFA
37
 
#define PS2_ERROR                       0xFC
38
 
 
39
 
/* standard PS/2 commands */
40
 
#define PS2_CMD_RESET                   0xFF
41
 
#define PS2_CMD_RESEND                  0xFE
42
 
#define PS2_CMD_SET_DEFAULT             0xF6
43
 
#define PS2_CMD_DISABLE                 0xF5
44
 
#define PS2_CMD_ENABLE                  0xF4
45
 
#define PS2_CMD_SET_SAMPLE_RATE         0xF3
46
 
#define PS2_CMD_READ_DEVICE_TYPE        0xF2
47
 
#define PS2_CMD_SET_REMOTE_MODE         0xF0
48
 
#define PS2_CMD_SET_WRAP_MODE           0xEE
49
 
#define PS2_CMD_RESET_WRAP_MODE         0xEC
50
 
#define PS2_CMD_READ_DATA               0xEB
51
 
#define PS2_CMD_SET_STREAM_MODE         0xEA
52
 
#define PS2_CMD_STATUS_REQUEST          0xE9
53
 
#define PS2_CMD_SET_RESOLUTION          0xE8
54
 
#define PS2_CMD_SET_SCALING_2_1         0xE7
55
 
#define PS2_CMD_SET_SCALING_1_1         0xE6
56
 
 
57
35
/* synaptics queries */
58
36
#define SYN_QUE_IDENTIFY                0x00
59
37
#define SYN_QUE_MODES                   0x01
108
86
/*
109
87
 * Write a byte to the ps/2 port, wait for ACK
110
88
 */
111
 
static Bool
 
89
Bool
112
90
ps2_putbyte(int fd, byte b)
113
91
{
114
92
    byte ack;
380
358
    return FALSE;
381
359
}
382
360
 
383
 
Bool
 
361
static Bool
384
362
ps2_synaptics_enable_device(int fd)
385
363
{
386
364
    return ps2_putbyte(fd, PS2_CMD_ENABLE);
387
365
}
388
366
 
389
 
Bool
 
367
static Bool
390
368
ps2_synaptics_disable_device(int fd)
391
369
{
392
370
    xf86FlushInput(fd);