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

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef __ASM_SH_KEYBOARD_H
  2. #define __ASM_SH_KEYBOARD_H
  3. /*
  4.  * $Id: keyboard.h,v 1.12 2001/09/06 04:01:41 gniibe Exp $
  5.  */
  6. #include <linux/kd.h>
  7. #include <linux/config.h>
  8. #include <asm/machvec.h>
  9. #ifdef CONFIG_SH_EC3104
  10. #include <asm/keyboard-ec3104.h>
  11. #else
  12. static __inline__ int kbd_setkeycode(unsigned int scancode,
  13.      unsigned int keycode)
  14. {
  15.     return -EOPNOTSUPP;
  16. }
  17. static __inline__ int kbd_getkeycode(unsigned int scancode)
  18. {
  19.     return scancode > 127 ? -EINVAL : scancode;
  20. }
  21. #ifdef CONFIG_SH_DREAMCAST
  22. extern int kbd_translate(unsigned char scancode, unsigned char *keycode,
  23.  char raw_mode);
  24. #else
  25. static __inline__ int kbd_translate(unsigned char scancode,
  26.     unsigned char *keycode, char raw_mode)
  27. {
  28.     *keycode = scancode;
  29.     return 1;
  30. }
  31. #endif
  32. static __inline__ char kbd_unexpected_up(unsigned char keycode)
  33. {
  34.     return 0200;
  35. }
  36. static __inline__ void kbd_leds(unsigned char leds)
  37. {
  38. }
  39. extern void hp600_kbd_init_hw(void);
  40. extern void dreamcast_kbd_init_hw(void);
  41. static __inline__ void kbd_init_hw(void)
  42. {
  43. if (MACH_HP600) {
  44. hp600_kbd_init_hw();
  45. }
  46. }
  47. #endif
  48. #endif