README.kbd 1.7 KB

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