Subversion Repositories group.electronics

Rev

Rev 94 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 pfowler 1
#ifndef __usbconfig_h_included__
2
#define __usbconfig_h_included__
3
 
4
/* ---------------------------- Hardware Config ---------------------------- */
5
 
6
#define USB_CFG_IOPORTNAME      D
7
#define USB_CFG_DMINUS_BIT      3
8
#define USB_CFG_DPLUS_BIT       2
94 pfowler 9
#define USB_CFG_CLOCK_KHZ       (F_CPU/1000)
33 pfowler 10
#define USB_CFG_CHECK_CRC       0
11
 
12
/* ----------------------- Optional Hardware Config ------------------------ */
13
 
14
/* #define USB_CFG_PULLUP_IOPORTNAME   D */
15
/* #define USB_CFG_PULLUP_BIT          4 */
16
 
17
/* --------------------------- Functional Range ---------------------------- */
18
 
19
#define USB_CFG_HAVE_INTRIN_ENDPOINT    1
20
#define USB_CFG_HAVE_INTRIN_ENDPOINT3   0
96 pfowler 21
//#define USB_CFG_EP3_NUMBER              3
33 pfowler 22
#define USB_CFG_IMPLEMENT_HALT          0
23
#define USB_CFG_SUPPRESS_INTR_CODE      0
96 pfowler 24
#define USB_CFG_INTR_POLL_INTERVAL      10
33 pfowler 25
#define USB_CFG_IS_SELF_POWERED         0
96 pfowler 26
#define USB_CFG_MAX_BUS_POWER           500
33 pfowler 27
#define USB_CFG_IMPLEMENT_FN_WRITE      0
28
#define USB_CFG_IMPLEMENT_FN_READ       0
29
#define USB_CFG_IMPLEMENT_FN_WRITEOUT   0
30
#define USB_CFG_HAVE_FLOWCONTROL        0
31
#define USB_CFG_DRIVER_FLASH_PAGE       0
32
#define USB_CFG_LONG_TRANSFERS          0
33
/* #define USB_RX_USER_HOOK(data, len)     if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
34
#ifndef __ASSEMBLER__
35
extern void hasUsbReset(void);
36
#endif
37
#define USB_RESET_HOOK(isReset)     if(!isReset){hadUsbReset();}
38
/* #define USB_SET_ADDRESS_HOOK()              hadAddressAssigned(); */
39
#define USB_COUNT_SOF                   0
40
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH   0
41
#define USB_USE_FAST_CRC                0
42
 
43
/* -------------------------- Device Description --------------------------- */
96 pfowler 44
 
45
#define  USB_CFG_VENDOR_ID       0x42, 0x42 
46
#define  USB_CFG_DEVICE_ID       0x32, 0xe3 
33 pfowler 47
#define USB_CFG_DEVICE_VERSION  0x00, 0x03
48
#define USB_CFG_VENDOR_NAME     'n', 'e', 'w', 'i', 'o', 'i', 't', '.', 'c', 'o', 'm', '.', 'a', 'u'
49
#define USB_CFG_VENDOR_NAME_LEN 14
50
#define USB_CFG_DEVICE_NAME     'F', 'S', 'i', 'm', 'E', 'x', 't', '.', '1', '1', '0', '0'
51
#define USB_CFG_DEVICE_NAME_LEN 12
52
/*#define USB_CFG_SERIAL_NUMBER   'N', 'o', 'n', 'e' */
53
/*#define USB_CFG_SERIAL_NUMBER_LEN   0 */
54
#define USB_CFG_DEVICE_CLASS        0    /* set to 0 if deferred to interface */
55
#define USB_CFG_DEVICE_SUBCLASS     0
56
#define USB_CFG_INTERFACE_CLASS     3   /* HID */
57
#define USB_CFG_INTERFACE_SUBCLASS  0	/* no boot interface */
58
#define USB_CFG_INTERFACE_PROTOCOL  0	/* no protocol */
94 pfowler 59
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    HID_SIZE
33 pfowler 60
/* #define USB_PUBLIC static */
61
 
62
#define USB_CFG_DESCR_PROPS_DEVICE                  0
63
#define USB_CFG_DESCR_PROPS_CONFIGURATION           0
64
#define USB_CFG_DESCR_PROPS_STRINGS                 0
65
#define USB_CFG_DESCR_PROPS_STRING_0                0
66
#define USB_CFG_DESCR_PROPS_STRING_VENDOR           0
67
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT          0
68
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER    0
69
#define USB_CFG_DESCR_PROPS_HID                     0
70
#define USB_CFG_DESCR_PROPS_HID_REPORT              0
71
#define USB_CFG_DESCR_PROPS_UNKNOWN                 0
72
 
73
/* ----------------------- Optional MCU Description ------------------------ */
74
 
75
/* #define USB_INTR_CFG            MCUCR */
76
/* #define USB_INTR_CFG_SET        ((1 << ISC00) | (1 << ISC01)) */
77
/* #define USB_INTR_CFG_CLR        0 */
78
/* #define USB_INTR_ENABLE         GIMSK */
79
/* #define USB_INTR_ENABLE_BIT     INT0 */
80
/* #define USB_INTR_PENDING        GIFR */
81
/* #define USB_INTR_PENDING_BIT    INTF0 */
82
/* #define USB_INTR_VECTOR         INT0_vect */
83
 
84
#endif /* __usbconfig_h_included__ */