hid.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright (c) 1999 Andreas Gal
  3. * Copyright (c) 2000-2001 Vojtech Pavlik
  4. * Copyright (c) 2006-2007 Jiri Kosina
  5. */
  6. /*
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. *
  21. * Should you need to contact me, the author, you can do so either by
  22. * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
  23. * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
  24. */
  25. #ifndef __HID_H
  26. #define __HID_H
  27. /*
  28. * USB HID (Human Interface Device) interface class code
  29. */
  30. #define USB_INTERFACE_CLASS_HID 3
  31. /*
  32. * USB HID interface subclass and protocol codes
  33. */
  34. #define USB_INTERFACE_SUBCLASS_BOOT 1
  35. #define USB_INTERFACE_PROTOCOL_KEYBOARD 1
  36. #define USB_INTERFACE_PROTOCOL_MOUSE 2
  37. /*
  38. * HID class requests
  39. */
  40. #define HID_REQ_GET_REPORT 0x01
  41. #define HID_REQ_GET_IDLE 0x02
  42. #define HID_REQ_GET_PROTOCOL 0x03
  43. #define HID_REQ_SET_REPORT 0x09
  44. #define HID_REQ_SET_IDLE 0x0A
  45. #define HID_REQ_SET_PROTOCOL 0x0B
  46. /*
  47. * HID class descriptor types
  48. */
  49. #define HID_DT_HID (USB_TYPE_CLASS | 0x01)
  50. #define HID_DT_REPORT (USB_TYPE_CLASS | 0x02)
  51. #define HID_DT_PHYSICAL (USB_TYPE_CLASS | 0x03)
  52. #define HID_MAX_DESCRIPTOR_SIZE 4096
  53. #endif /* __HID_H */