Subversion Repositories group.electronics

Rev

Rev 134 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 134 Rev 136
Line 1... Line 1...
1
#ifndef __usbconfig_h_included__
1
#ifndef __usbconfig_h_included__
2
#define __usbconfig_h_included__
2
#define __usbconfig_h_included__
3
 
3
 
4
/* ---------------------------- Hardware Config ---------------------------- */
4
/* ---------------------------- Hardware Config ---------------------------- */
5
 
5
 
6
#define USB_CFG_IOPORTNAME      D
6
#define USB_CFG_IOPORTNAME      B
7
#define USB_CFG_DMINUS_BIT      3
7
#define USB_CFG_DMINUS_BIT      1
8
#define USB_CFG_DPLUS_BIT       2
8
#define USB_CFG_DPLUS_BIT       2
9
#define USB_CFG_CLOCK_KHZ       (F_CPU/1000)
9
#define USB_CFG_CLOCK_KHZ       (F_CPU/1000)
10
 
10
 
11
/* --------------------------- Functional Range ---------------------------- */
11
/* --------------------------- Functional Range ---------------------------- */
12
 
12
 
13
#define USB_CFG_HAVE_INTRIN_ENDPOINT    0
13
#define USB_CFG_HAVE_INTRIN_ENDPOINT    0
14
#define USB_CFG_HAVE_INTRIN_ENDPOINT3   0
14
#define USB_CFG_HAVE_INTRIN_ENDPOINT3   0
15
#define USB_CFG_EP3_NUMBER              3
15
#define USB_CFG_EP3_NUMBER              0
16
#define USB_CFG_IMPLEMENT_HALT          0
16
#define USB_CFG_IMPLEMENT_HALT          0
17
#define USB_CFG_INTR_POLL_INTERVAL      10
17
#define USB_CFG_INTR_POLL_INTERVAL      10
18
#define USB_CFG_IS_SELF_POWERED         0
18
#define USB_CFG_IS_SELF_POWERED         0
19
#define USB_CFG_MAX_BUS_POWER           100
19
#define USB_CFG_MAX_BUS_POWER           200
20
#define USB_CFG_IMPLEMENT_FN_WRITE      0
20
#define USB_CFG_IMPLEMENT_FN_WRITE      0
21
#define USB_CFG_IMPLEMENT_FN_READ       0
21
#define USB_CFG_IMPLEMENT_FN_READ       0
22
#define USB_CFG_IMPLEMENT_FN_WRITEOUT   0
22
#define USB_CFG_IMPLEMENT_FN_WRITEOUT   0
23
#define USB_CFG_HAVE_FLOWCONTROL        0
23
#define USB_CFG_HAVE_FLOWCONTROL        0
24
 
24
 
-
 
25
#ifndef __ASSEMBLER__
-
 
26
extern void usbEventResetReady(void);
-
 
27
#endif
-
 
28
#define USB_RESET_HOOK(isReset)             if(!isReset){usbEventResetReady();}
25
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH   0
29
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH   1
26
 
30
 
27
/* -------------------------- Device Description --------------------------- */
31
/* -------------------------- Device Description --------------------------- */
28
 
32
 
29
#define  USB_CFG_VENDOR_ID       0x42, 0x42
33
#define  USB_CFG_VENDOR_ID       0xa0, 0x20
30
#define  USB_CFG_DEVICE_ID       0x31, 0xe2
34
#define  USB_CFG_DEVICE_ID       0x36, 0x42
31
#define USB_CFG_DEVICE_VERSION  0x02, 0x00
35
#define USB_CFG_DEVICE_VERSION  0x02, 0x00
32
#define USB_CFG_VENDOR_NAME     'n', 'e', 'w', 'i', 'o', 'i', 't', '.', 'c', 'o', 'm', '.', 'a', 'u'
36
#define USB_CFG_VENDOR_NAME     'n', 'e', 'w', 'i', 'o', 'i', 't', '.', 'c', 'o', 'm', '.', 'a', 'u'
33
#define USB_CFG_VENDOR_NAME_LEN 14
37
#define USB_CFG_VENDOR_NAME_LEN 14
34
#define USB_CFG_DEVICE_NAME     'C', 'o', 'm', 'm', ' ', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r'
38
#define USB_CFG_DEVICE_NAME     'N', 'I', 'T', ' ', 'C', 'o', 'm', 'm', '/', 'N', 'a', 'v'
35
#define USB_CFG_DEVICE_NAME_LEN 13
39
#define USB_CFG_DEVICE_NAME_LEN 12
36
/*#define USB_CFG_SERIAL_NUMBER   'N', 'o', 'n', 'e' */
40
/*#define USB_CFG_SERIAL_NUMBER   'N', 'o', 'n', 'e' */
37
/*#define USB_CFG_SERIAL_NUMBER_LEN   0 */
41
/*#define USB_CFG_SERIAL_NUMBER_LEN   0 */
38
#define USB_CFG_DEVICE_CLASS        0
42
#define USB_CFG_DEVICE_CLASS        0
39
#define USB_CFG_DEVICE_SUBCLASS     0
43
#define USB_CFG_DEVICE_SUBCLASS     0
40
#define USB_CFG_INTERFACE_CLASS     0xff   /* HID */
44
#define USB_CFG_INTERFACE_CLASS     0xff
41
#define USB_CFG_INTERFACE_SUBCLASS  0   /* no boot interface */
45
#define USB_CFG_INTERFACE_SUBCLASS  0   /* no boot interface */
42
#define USB_CFG_INTERFACE_PROTOCOL  0   /* no protocol */
46
#define USB_CFG_INTERFACE_PROTOCOL  0   /* no protocol */
43
//#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    HID_SIZE  /* total length of report descriptor */
47
//#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    HID_SIZE  /* total length of report descriptor */
44
/* #define USB_PUBLIC static */
48
/* #define USB_PUBLIC static */
45
 
49