Subversion Repositories group.electronics

Rev

Rev 96 | 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(); */
97 pfowler 34
 
33 pfowler 35
#ifndef __ASSEMBLER__
97 pfowler 36
extern void hadUsbReset(void);
33 pfowler 37
#endif
38
#define USB_RESET_HOOK(isReset)     if(!isReset){hadUsbReset();}
39
/* #define USB_SET_ADDRESS_HOOK()              hadAddressAssigned(); */
97 pfowler 40
 
33 pfowler 41
#define USB_COUNT_SOF                   0
42
#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH   0
43
#define USB_USE_FAST_CRC                0
44
 
45
/* -------------------------- Device Description --------------------------- */
96 pfowler 46
 
47
#define  USB_CFG_VENDOR_ID       0x42, 0x42 
48
#define  USB_CFG_DEVICE_ID       0x32, 0xe3 
33 pfowler 49
#define USB_CFG_DEVICE_VERSION  0x00, 0x03
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     'F', 'S', 'i', 'm', 'E', 'x', 't', '.', '1', '1', '0', '0'
53
#define USB_CFG_DEVICE_NAME_LEN 12
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    /* set to 0 if deferred to interface */
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 */
94 pfowler 61
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    HID_SIZE
33 pfowler 62
/* #define USB_PUBLIC static */
63
 
64
#define USB_CFG_DESCR_PROPS_DEVICE                  0
65
#define USB_CFG_DESCR_PROPS_CONFIGURATION           0
66
#define USB_CFG_DESCR_PROPS_STRINGS                 0
67
#define USB_CFG_DESCR_PROPS_STRING_0                0
68
#define USB_CFG_DESCR_PROPS_STRING_VENDOR           0
69
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT          0
70
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER    0
71
#define USB_CFG_DESCR_PROPS_HID                     0
72
#define USB_CFG_DESCR_PROPS_HID_REPORT              0
73
#define USB_CFG_DESCR_PROPS_UNKNOWN                 0
74
 
75
/* ----------------------- Optional MCU Description ------------------------ */
76
 
77
/* #define USB_INTR_CFG            MCUCR */
78
/* #define USB_INTR_CFG_SET        ((1 << ISC00) | (1 << ISC01)) */
79
/* #define USB_INTR_CFG_CLR        0 */
80
/* #define USB_INTR_ENABLE         GIMSK */
81
/* #define USB_INTR_ENABLE_BIT     INT0 */
82
/* #define USB_INTR_PENDING        GIFR */
83
/* #define USB_INTR_PENDING_BIT    INTF0 */
84
/* #define USB_INTR_VECTOR         INT0_vect */
85
 
86
#endif /* __usbconfig_h_included__ */