From: <sk...@us...> - 2011-09-17 17:14:46
|
Revision: 2435 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2435&view=rev Author: skitt Date: 2011-09-17 17:14:40 +0000 (Sat, 17 Sep 2011) Log Message: ----------- Subject: [PATCH] inputattach: Add PenMount 6000, 3000 and 6250 support From: John Sung <pen...@gm...> Signed-off-by: John Sung <pen...@gm...> Modified Paths: -------------- trunk/docs/inputattach.1 trunk/utils/inputattach.c Modified: trunk/docs/inputattach.1 =================================================================== --- trunk/docs/inputattach.1 2011-09-17 16:26:31 UTC (rev 2434) +++ trunk/docs/inputattach.1 2011-09-17 17:14:40 UTC (rev 2435) @@ -81,9 +81,18 @@ .BR \-newt ", " \-\-newtonkbd Newton keyboard. .TP -.BR \-pm ", " \-\-penmount -Penmount touchscreen. +.BR \-pm3k ", " \-\-penmount3000 +Penmount 3000 touchscreen. .TP +.BR \-pm6k ", " \-\-penmount6000 +Penmount 6000 touchscreen. +.TP +.BR \-pmm1 ", " \-\-penmount6250 +Penmount 6250 touchscreen. +.TP +.BR \-pm9k ", " \-\-penmount9000 +Penmount 9000 touchscreen. +.TP .BR \-ps2ser ", " \-\-ps2serkbd PS/2 via serial keyboard. .TP Modified: trunk/utils/inputattach.c =================================================================== --- trunk/utils/inputattach.c 2011-09-17 16:26:31 UTC (rev 2434) +++ trunk/utils/inputattach.c 2011-09-17 17:14:40 UTC (rev 2435) @@ -326,6 +326,24 @@ return 0; } +static int pm6k_init(int fd, unsigned long *id, unsigned long *extra) +{ + int i = 0; + unsigned char cmd[6] = {0xF1, 0x00, 0x00, 0x00, 0x00, 0x0E}; + unsigned char data[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + /* Enable the touchscreen */ + if (write(fd, cmd, sizeof(cmd)) != sizeof(cmd)) + return -1; + + /* Read ACK */ + for(i=0;i<sizeof(data);i++) + if (readchar(fd, &data[i], 100)<0) + break ; + + return 0; +} + static int fujitsu_init(int fd, unsigned long *id, unsigned long *extra) { unsigned char cmd, data; @@ -565,9 +583,18 @@ { "--touchwin", "-tw", "Touchwindow serial touchscreen", B4800, CS8 | CRTSCTS, SERIO_TOUCHWIN, 0x00, 0x00, 0, NULL }, -{ "--penmount", "-pm", "Penmount touchscreen", - B19200, CS8 | CRTSCTS, +{ "--penmount9000", "-pm9k", "PenMount 9000 touchscreen", + B19200, CS8, SERIO_PENMOUNT, 0x00, 0x00, 0, NULL }, +{ "--penmount6000", "-pm6k", "PenMount 6000 touchscreen", + B19200, CS8, + SERIO_PENMOUNT, 0x01, 0x00, 0, pm6k_init }, +{ "--penmount3000", "-pm3k", "PenMount 3000 touchscreen", + B38400, CS8, + SERIO_PENMOUNT, 0x02, 0x00, 0, NULL }, +{ "--penmount6250", "-pmm1", "PenMount 6250 touchscreen", + B19200, CS8, + SERIO_PENMOUNT, 0x03, 0x00, 0, NULL }, { "--fujitsu", "-fjt", "Fujitsu serial touchscreen", B9600, CS8, SERIO_FUJITSU, 0x00, 0x00, 1, fujitsu_init }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |