Fri, 17 Nov 2017 10:13:31 +0100
proper configuration, homing and planner optimization
2 | 1 | |
2 | ||
3 | /* Copyright (c) 2011, Peter Barrett | |
4 | ** | |
5 | ** Permission to use, copy, modify, and/or distribute this software for | |
6 | ** any purpose with or without fee is hereby granted, provided that the | |
7 | ** above copyright notice and this permission notice appear in all copies. | |
8 | ** | |
9 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | |
10 | ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
11 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR | |
12 | ** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES | |
13 | ** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
14 | ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
15 | ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
16 | ** SOFTWARE. | |
17 | */ | |
18 | ||
19 | #define CDC_ENABLED | |
20 | #define HID_ENABLED | |
21 | ||
22 | ||
23 | #ifdef CDC_ENABLED | |
24 | #define CDC_INTERFACE_COUNT 2 | |
25 | #define CDC_ENPOINT_COUNT 3 | |
26 | #else | |
27 | #define CDC_INTERFACE_COUNT 0 | |
28 | #define CDC_ENPOINT_COUNT 0 | |
29 | #endif | |
30 | ||
31 | #ifdef HID_ENABLED | |
32 | #define HID_INTERFACE_COUNT 1 | |
33 | #define HID_ENPOINT_COUNT 1 | |
34 | #else | |
35 | #define HID_INTERFACE_COUNT 0 | |
36 | #define HID_ENPOINT_COUNT 0 | |
37 | #endif | |
38 | ||
39 | #define CDC_ACM_INTERFACE 0 // CDC ACM | |
40 | #define CDC_DATA_INTERFACE 1 // CDC Data | |
41 | #define CDC_FIRST_ENDPOINT 1 | |
42 | #define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT) // CDC First | |
43 | #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1) | |
44 | #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2) | |
45 | ||
46 | #define HID_INTERFACE (CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT) // HID Interface | |
47 | #define HID_FIRST_ENDPOINT (CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT) | |
48 | #define HID_ENDPOINT_INT (HID_FIRST_ENDPOINT) | |
49 | ||
50 | #define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT) | |
51 | ||
52 | #ifdef CDC_ENABLED | |
53 | #define CDC_RX CDC_ENDPOINT_OUT | |
54 | #define CDC_TX CDC_ENDPOINT_IN | |
55 | #endif | |
56 | ||
57 | #ifdef HID_ENABLED | |
58 | #define HID_TX HID_ENDPOINT_INT | |
59 | #endif | |
60 | ||
61 | #define IMANUFACTURER 1 | |
62 | #define IPRODUCT 2 | |
63 |