keyboard.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  linux/include/asm-m68k/keyboard.h
  3.  *
  4.  *  Created 3 Nov 1996 by Geert Uytterhoeven
  5.  */
  6. /*
  7.  *  This file contains the m68k architecture specific keyboard definitions
  8.  */
  9. #ifndef __M68K_KEYBOARD_H
  10. #define __M68K_KEYBOARD_H
  11. #ifdef __KERNEL__
  12. #include <linux/config.h>
  13. #include <linux/kd.h>
  14. #include <asm/machdep.h>
  15. #ifdef CONFIG_Q40
  16. #include <asm/q40_keyboard.h>
  17. #endif
  18. static __inline__ int kbd_setkeycode(unsigned int scancode,
  19.      unsigned int keycode)
  20. {
  21. #ifdef CONFIG_Q40
  22.     if (MACH_IS_Q40)
  23.         return q40kbd_setkeycode(scancode,keycode);
  24. #endif
  25.     return -EOPNOTSUPP;
  26. }
  27. static __inline__ int kbd_getkeycode(unsigned int scancode)
  28. {
  29. #ifdef CONFIG_Q40
  30.     if (MACH_IS_Q40)
  31.         return q40kbd_getkeycode(scancode);
  32. #endif
  33.     return scancode > 127 ? -EINVAL : scancode;
  34. }
  35. static __inline__ char kbd_unexpected_up(unsigned char keycode)
  36. {
  37. #ifdef CONFIG_Q40
  38.     if (MACH_IS_Q40)
  39.         return q40kbd_unexpected_up(keycode);
  40. #endif
  41.     return 0200;
  42. }
  43. static __inline__ void kbd_leds(unsigned char leds)
  44. {
  45.     if (mach_kbd_leds)
  46. mach_kbd_leds(leds);
  47. }
  48. #define kbd_init_hw mach_keyb_init
  49. #define kbd_translate mach_kbd_translate
  50. #define kbd_rate mach_kbdrate
  51. #define kbd_sysrq_xlate mach_sysrq_xlate
  52. /* resource allocation */
  53. #define kbd_request_region()
  54. #define kbd_request_irq(handler)
  55. extern unsigned int SYSRQ_KEY;
  56. #endif /* __KERNEL__ */
  57. #endif /* __M68K_KEYBOARD_H */