patch-2.4.20 linux-2.4.20/drivers/tc/lk201.h

Next file: linux-2.4.20/drivers/tc/tc.c
Previous file: linux-2.4.20/drivers/tc/lk201.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/tc/lk201.h linux-2.4.20/drivers/tc/lk201.h
@@ -20,7 +20,7 @@
 #define LK_CMD_ENB_BELL		0x23	/* enable the bell */
 					/* 1st param: volume */
 #define LK_CMD_BELL		0xa7	/* emit a bell */
-#define LK_CMD_TMP_NORPT	0xc1	/* disable typematic */
+#define LK_CMD_TMP_NORPT	0xd1	/* disable typematic */
 					/* for the currently pressed key */
 #define LK_CMD_ENB_RPT		0xe3	/* enable typematic */
 					/* for RPT_DOWN groups */
@@ -33,15 +33,15 @@
 #define LK_CMD_TEST_EXIT	0x80	/* exit the factory test mode */
 #define LK_CMD_SET_DEFAULTS	0xd3	/* set power-up defaults */
 
-#define LK_CMD_MODE(m,div)	(LK_PARAM|(((div)&0xf)<<3)|m)
+#define LK_CMD_MODE(m,div)	(LK_PARAM|(((div)&0xf)<<3)|(((m)&0x3)<<1))
 					/* select the repeat mode */
 					/* for the selected key group */
-#define LK_CMD_MODE_AR(m,div)	((((div)&0xf)<<3)|m)
+#define LK_CMD_MODE_AR(m,div)	((((div)&0xf)<<3)|(((m)&0x3)<<1))
 					/* select the repeat mode */
 					/* and the repeat register */
 					/* for the selected key group */
 					/* 1st param: register number */
-#define LK_CMD_RPT_RATE(r)	(0x04|((((r)&0x3)<<1)))
+#define LK_CMD_RPT_RATE(r)	(0x78|(((r)&0x3)<<1))
 					/* set the delay and repeat rate */
 					/* for the selected repeat register */
 					/* 1st param: initial delay */
@@ -59,8 +59,8 @@
 
 /* mode set command details, div is a key group number */
 #define LK_MODE_DOWN		0x0	/* make only */
-#define LK_MODE_RPT_DOWN	0x2	/* make and typematic */
-#define LK_MODE_DOWN_UP		0x6	/* make and release */
+#define LK_MODE_RPT_DOWN	0x1	/* make and typematic */
+#define LK_MODE_DOWN_UP		0x3	/* make and release */
 
 /* there are 4 repeat registers */
 #define LK_PARAM_AR(r)		(LK_PARAM|((v)&0x3))
@@ -115,6 +115,7 @@
 					/* the keycode follows */
 #define LK_STAT_MODE_ACK	0xba	/* the mode command succeeded */
 
+#define LK_STAT_PWRUP_ID	0x01	/* the power-up response start mark */
 #define LK_STAT_PWRUP_OK	0x00	/* the power-up self test OK */
 #define LK_STAT_PWRUP_KDOWN	0x3d	/* a key was down during the test */
 #define LK_STAT_PWRUP_ERROR	0x3e	/* keyboard self test failure */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)