Subversion Repositories group.electronics

Rev

Rev 77 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
75 pfowler 1
/* Name: usbconfig.h
2
 * Project: AVR USB driver
3
 * Author: Christian Starkjohann
4
 * Creation Date: 2007-06-23
5
 * Tabsize: 4
6
 * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
7
 * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
8
 * This Revision: $Id$
9
 */
10
 
11
#ifndef __usbconfig_h_included__
12
#define __usbconfig_h_included__
13
 
14
/* ---------------------------- Hardware Config ---------------------------- */
15
 
16
#define USB_CFG_IOPORTNAME      B
17
#define USB_CFG_DMINUS_BIT      1
18
#define USB_CFG_DPLUS_BIT       2
19
#define USB_CFG_CLOCK_KHZ       (F_CPU/1000)
20
 
21
/* ----------------------- Optional Hardware Config ------------------------ */
22
 
23
/* #define USB_CFG_PULLUP_IOPORTNAME   D */
24
/* #define USB_CFG_PULLUP_BIT          4 */
25
 
26
/* --------------------------- Functional Range ---------------------------- */
27
 
28
#define USB_CFG_HAVE_INTRIN_ENDPOINT    1
29
#define USB_CFG_HAVE_INTRIN_ENDPOINT3   0
30
#define USB_CFG_IMPLEMENT_HALT          0
31
#define USB_CFG_INTR_POLL_INTERVAL      10
32
#define USB_CFG_IS_SELF_POWERED         0
33
#define USB_CFG_MAX_BUS_POWER           100
34
#define USB_CFG_IMPLEMENT_FN_WRITE      0
35
#define USB_CFG_IMPLEMENT_FN_READ       0
36
#define USB_CFG_IMPLEMENT_FN_WRITEOUT   0
37
#define USB_CFG_HAVE_FLOWCONTROL        0
38
 
39
#ifndef __ASSEMBLER__
40
extern void usbEventResetReady(void);
41
#endif
42
#define USB_RESET_HOOK(isReset)             if(!isReset){usbEventResetReady();}
43
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH   1
44
 
45
/* -------------------------- Device Description --------------------------- */
46
 
47
#define  USB_CFG_VENDOR_ID       0x42, 0x42
48
#define  USB_CFG_DEVICE_ID       0x31, 0xe1
49
#define USB_CFG_DEVICE_VERSION  0x00, 0x02
50
#define USB_CFG_VENDOR_NAME     'n', 'e', 'w', 'i', 'o', 'i', 't', '.', 'c', 'o', 'm', '.', 'a', 'u'
51
#define USB_CFG_VENDOR_NAME_LEN 14
52
#define USB_CFG_DEVICE_NAME     'S', 'a', 'i', 't', 'e', 'k', ' ', 'T', 'r', 'i', 'm', ' ', 'W', 'h', 'e', 'e', 'l'
53
#define USB_CFG_DEVICE_NAME_LEN 17
54
/*#define USB_CFG_SERIAL_NUMBER   'N', 'o', 'n', 'e' */
55
/*#define USB_CFG_SERIAL_NUMBER_LEN   0 */
56
#define USB_CFG_DEVICE_CLASS        0
57
#define USB_CFG_DEVICE_SUBCLASS     0
58
#define USB_CFG_INTERFACE_CLASS     3   /* HID */
59
#define USB_CFG_INTERFACE_SUBCLASS  0   /* no boot interface */
60
#define USB_CFG_INTERFACE_PROTOCOL  0   /* no protocol */
78 pfowler 61
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    46  /* total length of report descriptor */
75 pfowler 62
/* #define USB_PUBLIC static */
63
 
64
/* ------------------- Fine Control over USB Descriptors ------------------- */
65
 
66
#define USB_CFG_DESCR_PROPS_DEVICE                  0
67
#define USB_CFG_DESCR_PROPS_CONFIGURATION           0
68
#define USB_CFG_DESCR_PROPS_STRINGS                 0
69
#define USB_CFG_DESCR_PROPS_STRING_0                0
70
#define USB_CFG_DESCR_PROPS_STRING_VENDOR           0
71
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT          0
72
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER    0
73
#define USB_CFG_DESCR_PROPS_HID                     0
74
#define USB_CFG_DESCR_PROPS_HID_REPORT              0
75
#define USB_CFG_DESCR_PROPS_UNKNOWN                 0
76
 
77
/* ----------------------- Optional MCU Description ------------------------ */
78
 
79
/* #define USB_INTR_CFG            MCUCR */
80
/* #define USB_INTR_CFG_SET        ((1 << ISC00) | (1 << ISC01)) */
81
/* #define USB_INTR_CFG_CLR        0 */
82
/* #define USB_INTR_ENABLE         GIMSK */
83
/* #define USB_INTR_ENABLE_BIT     INT0 */
84
/* #define USB_INTR_PENDING        GIFR */
85
/* #define USB_INTR_PENDING_BIT    INTF0 */
86
 
87
#endif /* __usbconfig_h_included__ */