Project

General

Profile

Statistics
| Branch: | Revision:

root / arduino-1.0 / hardware / arduino / bootloaders / diskloader / src / USBDesc.h @ 58d82c77

History | View | Annotate | Download (1.79 KB)

1 58d82c77 Tom Mullins
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
20
#ifdef CDC_ENABLED
21
22
#define CDC_ACM_INTERFACE        0        // CDC ACM
23
#define CDC_DATA_INTERFACE        1        // CDC Data
24
#define CDC_ENDPOINT_ACM        1
25
#define CDC_ENDPOINT_OUT        2
26
#define CDC_ENDPOINT_IN                3
27
28
#define HID_INTERFACE                2        // HID Interface
29
#define HID_ENDPOINT_INT        4
30
31
#define INTERFACE_COUNT                3        // 2 for cdc + 1 for hid
32
33
#else 
34
35
#define HID_INTERFACE                2        // HID Interface
36
#define HID_ENDPOINT_INT        4
37
38
#define INTERFACE_COUNT                1        // 1 for hid
39
40
#endif
41
42
typedef struct
43
{
44
        ConfigDescriptor        config;
45
#ifdef CDC_ENABLED
46
        CDCDescriptor                cdc;
47
#endif
48
        HIDDescriptor                hid;
49
} Config;
50
51
extern Config USB_ConfigDescriptor PROGMEM;
52
extern DeviceDescriptor USB_DeviceDescriptor PROGMEM;
53
extern DeviceDescriptor USB_DeviceDescriptorA PROGMEM;
54
55
extern const u16 STRING_LANGUAGE[2] PROGMEM;
56
extern const u16 STRING_IPRODUCT[28] PROGMEM;
57
extern const u16 STRING_IMANUFACTURER[12] PROGMEM;
58
extern const u16 STRING_SERIAL[13] PROGMEM;
59
60
#define IMANUFACTURER        1
61
#define IPRODUCT                2
62
#define ISERIAL                        3
63
64
#define CDC_TX CDC_ENDPOINT_IN
65
#define CDC_RX CDC_ENDPOINT_OUT