项目作者: miguelleitao

项目描述 :
Device driver for small keyboards connected to the parallel port
高级语言: C
项目地址: git://github.com/miguelleitao/keypad16.git
创建时间: 2016-11-15T15:52:46Z
项目社区:https://github.com/miguelleitao/keypad16

开源协议:

下载


keypad16

======
keypad16 is a device driver for small keyboards connected to the parallel port.

keypad16 is implemented as a Linux Kernel module and can be compiled out of the tree for most Kernel versions.

keypad16 is not aimed to production. Its goal is to provide programing examples and to help learning.

keypad16 is available in several steps that are not related to software versions.

Steps

  • keypad16_a710: basic device driver skeleton. Does not implement keyboard scanning.

  • keypad16_a711: basic keyboard device driver. Keyboard scanning and output as scancode.

  • keypad16_a712: Output as ASCII key code. Conversion from scancode to key is done by a static table.

  • keypad16_a713: Added event detector.

  • keypad16_a714: Added input buffer.

  • keypad16_a715: Added /proc interface

Sugested usage

  1. # import all
  2. git clone https://github.com/miguelleitao/keypad16.git
  3. cd keypad16
  4. ls
  5. # compile all
  6. make
  7. ls
  8. # try step 0
  9. insmod keypad16_a710.ko
  10. lsmod
  11. dmesg
  12. mknod /dev/keypad16 c 216 0
  13. cat /dev/keypad16
  14. ^c
  15. rmmod keypad16_a710
  16. # try step 1
  17. # Connect keypad to parallel port
  18. insmod keypad16_a711.ko
  19. lsmod
  20. dmesg
  21. cat /dev/keypad16
  22. # press some keypad keys
  23. ^c
  24. ./tcode /dev/keypad16
  25. # press some keypad keys
  26. ^c
  27. rmmod keypad16_a711
  28. # try step 2
  29. insmod keypad16_a712.ko
  30. cat /dev/keypad16
  31. # press some keypad keys
  32. ^c
  33. rmmod keypad16_a712
  34. # try step 3
  35. insmod keypad16_a713.ko
  36. cat /dev/keypad16
  37. # press and hold some keypad keys
  38. ^c
  39. rmmod keypad16_a713
  40. # try step 4
  41. insmod keypad16_a714.ko
  42. # press some keypad keys
  43. cat /dev/keypad16
  44. # press some keypad keys
  45. ^c
  46. rmmod keypad16_a714
  47. # try step 5
  48. insmod keypad16_a715.ko
  49. cat /proc/keypad16/table
  50. cat /proc/keypad16/rep_first
  51. cat /proc/keypad16/rep_time
  52. cat /proc/keypad16/buffer
  53. # press some keypad keys
  54. cat /proc/keypad16/buffer
  55. cat /dev/keypad16
  56. cat /proc/keypad16/buffer
  57. # press and hold some keypad keys
  58. ^c
  59. rmmod keypad16_a715