COSA
An Object-Oriented Platform for Arduino Programming
Desc.h
Go to the documentation of this file.
1 
22 #ifndef COSA_USB_DESC_H
23 #define COSA_USB_DESC_H
24 
25 #include "Cosa/Types.h"
26 
27 #define CDC_ENABLED
28 
29 // Fix: Add support for keyboard and mouse
30 // #define HID_ENABLED
31 
32 #ifdef CDC_ENABLED
33 #define CDC_INTERFACE_COUNT 2
34 #define CDC_ENPOINT_COUNT 3
35 #else
36 #define CDC_INTERFACE_COUNT 0
37 #define CDC_ENPOINT_COUNT 0
38 #endif
39 
40 #ifdef HID_ENABLED
41 #define HID_INTERFACE_COUNT 1
42 #define HID_ENPOINT_COUNT 1
43 #else
44 #define HID_INTERFACE_COUNT 0
45 #define HID_ENPOINT_COUNT 0
46 #endif
47 
48 #define CDC_ACM_INTERFACE 0
49 #define CDC_DATA_INTERFACE 1
50 #define CDC_FIRST_ENDPOINT 1
51 #define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT)
52 #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1)
53 #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2)
54 
55 #define HID_INTERFACE (CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT)
56 #define HID_FIRST_ENDPOINT (CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT)
57 #define HID_ENDPOINT_INT (HID_FIRST_ENDPOINT)
58 
59 #define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT)
60 
61 #ifdef CDC_ENABLED
62 #define CDC_RX CDC_ENDPOINT_OUT
63 #define CDC_TX CDC_ENDPOINT_IN
64 #endif
65 
66 #ifdef HID_ENABLED
67 #define HID_TX HID_ENDPOINT_INT
68 #endif
69 
70 #define IMANUFACTURER 1
71 #define IPRODUCT 2
72 
73 #endif