diff options
author | Peter Osterlund <petero2@telia.com> | 2003-10-13 23:06:52 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:01:17 +0200 |
commit | d2aa3f955bba0159b2190c1012365699f0b8ecba (patch) | |
tree | 04d9674db076e40b56965bbd4068911cac98ecf8 /ps2comm.h | |
parent | 909bb54fdb1f9fee3aa004df112c02d754ef53d0 (diff) |
Cosmetic cleanup in ps2comm.h.
Diffstat (limited to 'ps2comm.h')
-rw-r--r-- | ps2comm.h | 64 |
1 files changed, 32 insertions, 32 deletions
@@ -2,46 +2,46 @@ #define _PS2COMM_H_ /* synatics modes */ -#define SYN_BIT_ABSOLUTE_MODE (1<<7) -#define SYN_BIT_HIGH_RATE (1<<6) -#define SYN_BIT_SLEEP_MODE (1<<3) -#define SYN_BIT_DISABLE_GESTURE (1<<2) -#define SYN_BIT_W_MODE (1<<0) +#define SYN_BIT_ABSOLUTE_MODE (1 << 7) +#define SYN_BIT_HIGH_RATE (1 << 6) +#define SYN_BIT_SLEEP_MODE (1 << 3) +#define SYN_BIT_DISABLE_GESTURE (1 << 2) +#define SYN_BIT_W_MODE (1 << 0) /* synaptics model ID bits */ -#define SYN_MODEL_ROT180(m) (m&(1<<23)) -#define SYN_MODEL_PORTRAIT(m) (m&(1<<22)) -#define SYN_MODEL_SENSOR(m) ((m>>16)&0x3f) -#define SYN_MODEL_HARDWARE(m) ((m>>9)0x7f) -#define SYN_MODEL_NEWABS(m) (m&(1<<7)) -#define SYN_MODEL_PEN(m) (m&(1<<6)) -#define SYN_MODEL_SIMPLIC(m) (m&(1<<5)) -#define SYN_MODEL_GEOMETRY(m) (m&0x0f) +#define SYN_MODEL_ROT180(m) ((m) & (1 << 23)) +#define SYN_MODEL_PORTRAIT(m) ((m) & (1 << 22)) +#define SYN_MODEL_SENSOR(m) (((m) >> 16) & 0x3f) +#define SYN_MODEL_HARDWARE(m) (((m) >> 9) & 0x7f) +#define SYN_MODEL_NEWABS(m) ((m) & (1 << 7)) +#define SYN_MODEL_PEN(m) ((m) & (1 << 6)) +#define SYN_MODEL_SIMPLIC(m) ((m) & (1 << 5)) +#define SYN_MODEL_GEOMETRY(m) ((m) & 0x0f) /* synaptics capability bits */ -#define SYN_CAP_EXTENDED(c) (c&(1<<23)) -#define SYN_CAP_SLEEP(c) (c&(1<<4)) -#define SYN_CAP_FOUR_BUTTON(c) (c&(1<<3)) -#define SYN_CAP_MULTIFINGER(c) (c&(1<<1)) -#define SYN_CAP_PALMDETECT(c) (c&(1<<0)) -#define SYN_CAP_VALID(c) (((c&0x00ff00)>>8)==0x47) -#define SYN_EXT_CAP_REQUESTS(c) ((c&0x700000) == 0x100000) -#define SYN_CAP_MULTI_BUTTON_NO(ec) ((ec&0x00f000)>>12) +#define SYN_CAP_EXTENDED(c) ((c) & (1 << 23)) +#define SYN_CAP_SLEEP(c) ((c) & (1 << 4)) +#define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3)) +#define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1)) +#define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0)) +#define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) +#define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) == 0x100000) +#define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) /* synaptics modes query bits */ -#define SYN_MODE_ABSOLUTE(m) (m&(1<<7)) -#define SYN_MODE_RATE(m) (m&(1<<6)) -#define SYN_MODE_BAUD_SLEEP(m) (m&(1<<3)) -#define SYN_MODE_DISABLE_GESTURE(m) (m&(1<<2)) -#define SYN_MODE_PACKSIZE(m) (m&(1<<1)) -#define SYN_MODE_WMODE(m) (m&(1<<0)) -#define SYN_MODE_VALID(m) ((m&0xffff00)==0x3B47) +#define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) +#define SYN_MODE_RATE(m) ((m) & (1 << 6)) +#define SYN_MODE_BAUD_SLEEP(m) ((m) & (1 << 3)) +#define SYN_MODE_DISABLE_GESTURE(m) ((m) & (1 << 2)) +#define SYN_MODE_PACKSIZE(m) ((m) & (1 << 1)) +#define SYN_MODE_WMODE(m) ((m) & (1 << 0)) +#define SYN_MODE_VALID(m) (((m) & 0xffff00) == 0x3B47) /* synaptics identify query bits */ -#define SYN_ID_MODEL(i) ((i>>4)&0x0f) -#define SYN_ID_MAJOR(i) (i&0x0f) -#define SYN_ID_MINOR(i) ((i>>16)&0xff) -#define SYN_ID_IS_SYNAPTICS(i) (((i>>8)&0xff)==0x47) +#define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) +#define SYN_ID_MAJOR(i) ((i) & 0x0f) +#define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) +#define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) typedef unsigned char byte; |