]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - keyboard/lufa/Descriptors.h
Add sendchar with Generic HID to support debug print.
[max/tmk_keyboard.git] / keyboard / lufa / Descriptors.h
1 /*\r
2              LUFA Library\r
3      Copyright (C) Dean Camera, 2012.\r
4 \r
5   dean [at] fourwalledcubicle [dot] com\r
6            www.lufa-lib.org\r
7 */\r
8 \r
9 /*\r
10   Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
11   Copyright 2010  Denver Gingerich (denver [at] ossguy [dot] com)\r
12 \r
13   Permission to use, copy, modify, distribute, and sell this\r
14   software and its documentation for any purpose is hereby granted\r
15   without fee, provided that the above copyright notice appear in\r
16   all copies and that both that the copyright notice and this\r
17   permission notice and warranty disclaimer appear in supporting\r
18   documentation, and that the name of the author not be used in\r
19   advertising or publicity pertaining to distribution of the\r
20   software without specific, written prior permission.\r
21 \r
22   The author disclaim all warranties with regard to this\r
23   software, including all implied warranties of merchantability\r
24   and fitness.  In no event shall the author be liable for any\r
25   special, indirect or consequential damages or any damages\r
26   whatsoever resulting from loss of use, data or profits, whether\r
27   in an action of contract, negligence or other tortious action,\r
28   arising out of or in connection with the use or performance of\r
29   this software.\r
30 */\r
31 \r
32 /** \file\r
33  *\r
34  *  Header file for Descriptors.c.\r
35  */\r
36 \r
37 #ifndef _DESCRIPTORS_H_\r
38 #define _DESCRIPTORS_H_\r
39 \r
40 #include <LUFA/Drivers/USB/USB.h>\r
41 #include <avr/pgmspace.h>\r
42 \r
43 \r
44 typedef struct\r
45 {\r
46     USB_Descriptor_Configuration_Header_t Config;\r
47 \r
48     // Keyboard HID Interface\r
49     USB_Descriptor_Interface_t            HID1_KeyboardInterface;\r
50     USB_HID_Descriptor_HID_t              HID1_KeyboardHID;\r
51     USB_Descriptor_Endpoint_t             HID1_ReportINEndpoint;\r
52     USB_Descriptor_Endpoint_t             HID1_ReportOUTEndpoint;\r
53 \r
54     // Mouse HID Interface\r
55     USB_Descriptor_Interface_t            HID2_MouseInterface;\r
56     USB_HID_Descriptor_HID_t              HID2_MouseHID;\r
57     USB_Descriptor_Endpoint_t             HID2_ReportINEndpoint;\r
58 \r
59     // Generic HID Interface\r
60     USB_Descriptor_Interface_t            HID3_GenericInterface;\r
61     USB_HID_Descriptor_HID_t              HID3_GenericHID;\r
62     USB_Descriptor_Endpoint_t             HID3_ReportINEndpoint;\r
63     USB_Descriptor_Endpoint_t             HID3_ReportOUTEndpoint;\r
64 } USB_Descriptor_Configuration_t;\r
65 \r
66 \r
67 // Endopoint number/size\r
68 #define KEYBOARD_IN_EPNUM         1\r
69 #define KEYBOARD_OUT_EPNUM        2\r
70 #define MOUSE_IN_EPNUM            3\r
71 #define GENERIC_IN_EPNUM          4\r
72 #define GENERIC_OUT_EPNUM         5\r
73 \r
74 #define HID_EPSIZE                8\r
75 #define GENERIC_EPSIZE            8\r
76 #define GENERIC_REPORT_SIZE       8\r
77 \r
78 \r
79 uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,\r
80                                     const uint8_t wIndex,\r
81                                     const void** const DescriptorAddress)\r
82                                     ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
83 \r
84 #endif\r