Commit | Line | Data |
---|---|---|
15637ed4 | 1 | /* |
15637ed4 | 2 | * Keyboard definitions |
d7136515 | 3 | * from: unknown origin, 386BSD 0.1 |
95445baa | 4 | * $Id: kbd.h,v 1.2 1993/10/16 13:46:04 rgrimes Exp $ |
15637ed4 RG |
5 | */ |
6 | ||
95445baa GW |
7 | #ifndef _I386_ISA_KBD_H_ |
8 | #define _I386_ISA_KBD_H_ 1 | |
9 | ||
15637ed4 RG |
10 | /* Reference: IBM AT Technical Reference Manual, |
11 | * pp. 1-38 to 1-43, 4-3 to 4-22 | |
12 | */ | |
13 | ||
14 | /* commands sent to KBCMDP */ | |
15 | ||
16 | #define KBC_CMDREAD 0x20 /* read kbd cntrl command byte */ | |
17 | #define KBC_CMDWRITE 0x60 /* == LD_CMDBYTE in kd.h, write command */ | |
18 | #define KBC_SELFTEST 0xAA /* perform self test, returns 55 when ok */ | |
19 | #define KBC_IFTEST 0xAB /* perform interface test */ | |
20 | #define KBC_DIAGDUMP 0xAC /* send 19 status bytes to system */ | |
21 | #define KBC_DISKBD 0xAD /* disable keyboard */ | |
22 | #define KBC_ENAKBD 0xAE /* enable keyboard */ | |
23 | #define KBC_RDINP 0xC0 /* read input port */ | |
24 | #define KBC_RDID 0xC4 /* read keyboard ID */ | |
25 | #define KBC_RDOUTP 0xD0 /* read output port */ | |
26 | #define KBC_WROUTP 0xD1 /* write output port */ | |
27 | #define KBC_RDTINP 0xE0 /* read test inputs */ | |
28 | ||
29 | /* commands sent to KBDATAP */ | |
30 | #define KBC_STSIND 0xED /* set keyboard status indicators */ | |
31 | #define KBC_ECHO 0xEE /* reply with 0xEE */ | |
32 | #define KBC_SETTPM 0xF3 /* Set typematic rate/delay */ | |
33 | #define KBC_ENABLE 0xF4 /* Start scanning */ | |
34 | #define KBC_SETDEFD 0xF5 /* =KBC_SETDEF, but disable scanning */ | |
35 | #define KBC_SETDEF 0xF6 /* Set power on defaults */ | |
36 | #define KBC_RESEND 0xFE /* system wants keyboard to resend last code */ | |
37 | #define KBC_RESET 0xFF /* Reset the keyboard */ | |
38 | ||
39 | /* responses */ | |
40 | #define KBR_OVERRUN 0x00 /* Keyboard flooded */ | |
41 | #define KBR_STOK 0x55 /* Selftest ok response */ | |
42 | #define KBR_IFOK 0x00 /* Interface test ok */ | |
43 | #define KBR_IFCL_SA0 0x01 /* Clock Stuck-at-0 fault */ | |
44 | #define KBR_IFCL_SA1 0x02 /* Clock Stuck-at-1 fault */ | |
45 | #define KBR_IFDA_SA0 0x03 /* Data Stuck-at-0 fault */ | |
46 | #define KBR_IFDA_SA1 0x04 /* Data Stuck-at-1 fault */ | |
47 | #define KBR_RSTDONE 0xAA /* Keyboard reset (BAT) complete */ | |
48 | #define KBR_E0 0xE0 /* Extended prefix */ | |
49 | #define KBR_E1 0xE1 /* BREAK'S HIT :-( */ | |
50 | #define KBR_ECHO 0xEE /* Echo response */ | |
51 | #define KBR_F0 0xF0 /* Break code prefix */ | |
52 | #define KBR_ACK 0xFA /* Keyboard did receive command */ | |
53 | #define KBR_BATFAIL 0xFC /* BAT failed */ | |
54 | #define KBR_DIAGFAIL 0xFD /* Diagnostic failed response */ | |
55 | #define KBR_RESEND 0xFE /* Keyboard needs resend of command */ | |
95445baa | 56 | #endif /* _I386_ISA_KBD_H_ */ |