| plan 9 kernel history: overview | file list | diff list |
1992/0904/pc/kbd.c (diff list | history)
| 1992/0902/sys/src/9/pc/kbd.c:112,117 – 1992/0904/sys/src/9/pc/kbd.c:112,125 (short | long | prev | next) | ||
| 1991/0905 | */ static void kbdintr(Ureg*); | |
| 1992/0904 | enum { /* what kind of mouse */ Mouseother= 0, Mouseserial= 1, MousePS2= 2, }; static int mousetype; | |
| 1991/0703 | ||
| 1991/0803 | /* * wait for output no longer busy | |
| 1992/0902/sys/src/9/pc/kbd.c:207,252 – 1992/0904/sys/src/9/pc/kbd.c:215,266 | ||
| 1991/0730 | if(c & Inready) inb(Data); | |
| 1992/0902 |
| |
| 1992/0408 |
| |
| 1992/0904 | /* enable kbd xfers and interrupts */ outb(Cmd, 0x60); if(outready() < 0) print("kbd init failed\n"); outb(Data, 0x65); } | |
| 1992/0408 | ||
| 1991/1210 |
| |
| 1992/0904 | /* * setup a serial mouse */ void mouseserial(int port) { if(mousetype) return; | |
| 1992/0811 |
| |
| 1992/0825 |
| |
| 1991/1210 |
| |
| 1992/0902 |
| |
| 1991/1210 |
| |
| 1992/0904 | /* set up /dev/eia0 as the mouse */ uartspecial(port, 0, &mouseq, 1200); mousetype = Mouseserial; } | |
| 1992/0408 |
| |
| 1992/0825 |
| |
| 1992/0902 |
| |
| 1992/0825 |
| |
| 1992/0904 | /* * set up a ps2 mouse */ void mouseps2(void) { if(mousetype) return; bigcursor(); setvec(Mousevec, kbdintr); /* enable kbd/mouse xfers and interrupts */ outb(Cmd, 0x60); if(outready() < 0) print("kbd init failed\n"); outb(Data, 0x47); if(outready() < 0) print("kbd init failed\n"); outb(Cmd, 0xA8); /* make mouse streaming, enabled */ mousecmd(0xEA); mousecmd(0xF4); mousetype = MousePS2; | |
| 1992/0825 | } /* | |
| 1992/0902/sys/src/9/pc/kbd.c:262,267 – 1992/0904/sys/src/9/pc/kbd.c:276,296 | ||
| 1992/0825 | mousecmd(0xE7); else mousecmd(0xE6); | |
| 1992/0904 | break; } } /* * set mouse resolution */ void mouseres(int res) { switch(mousetype){ case MousePS2: mousecmd(0xE8); mousecmd(res); | |
| 1991/1210 | break; } | |
| 1991/0731 | } | |