2 The TRAB keyboard implementation is similar to that for LWMON and
3 R360MPI boards. The only difference concerns key naming. There are 4
4 keys on TRAB: 1, 2, 3, 4.
6 1) The "kbd" command provides information about the current state of
12 means that keys 1 and 3 are pressed. The keyboard status is also
13 stored in the "keybd" environment variable. In this example we get
17 2) The "preboot" variable is set according to current environment
18 settings and keys pressed. This is an example:
20 TRAB # setenv magic_keys XY
21 TRAB # setenv key_magicX 12
22 TRAB # setenv key_cmdX echo ## Keys 1 + 2 pressed ##\;echo
23 TRAB # setenv key_magicY 13
24 TRAB # setenv key_cmdY echo ## Keys 1 + 3 pressed ##\;echo
26 Here "magic_keys=XY" means that the "key_magicX" and "key_magicY"
27 variables will be checked for a match. Each variable "key_magic*"
28 defines a set of keys. In the our example, if keys 1 and 3 are
29 pressed during reset, then "key_magicY" matches, so the "preboot"
30 variable will be set to the contents of "key_cmdY":
32 preboot=echo ## Keys 1 + 3 pressed ##;echo
34 3) The TRAB board has optional modem support. When a certain key
35 combination is pressed on the keyboard at power-on, the firmware
36 performs the necessary initialization of the modem and allows for
37 dial-in. The key combination is specified in the
38 "include/configs/trab.h" file. For example:
40 #define CONFIG_MODEM_KEY_MAGIC "23"
42 means that modem will be initialized if and only if both keys 2, 3
43 are pressed. Note that the format of this string is similar to the
44 format of "key_magic*" environment variables described above.