Add control endpoints to test firmware
This commit is contained in:
parent
9f208cb3cb
commit
fa9de82da4
@ -3,7 +3,7 @@
|
||||
char usbDescriptorConfiguration[] = { /* USB configuration descriptor */
|
||||
9, /* sizeof(usbDescriptorConfiguration): length of descriptor in bytes */
|
||||
USBDESCR_CONFIG, /* descriptor type */
|
||||
18 + 10 * 7, 0,
|
||||
18 + 12 * 7, 0,
|
||||
/* total length of data returned (including inlined descriptors) */
|
||||
1, /* number of interfaces in this configuration */
|
||||
1, /* index of this configuration */
|
||||
@ -15,7 +15,7 @@ char usbDescriptorConfiguration[] = { /* USB configuration descriptor */
|
||||
USBDESCR_INTERFACE, /* descriptor type */
|
||||
0, /* index of this interface */
|
||||
0, /* alternate setting for this interface */
|
||||
10, /* endpoints excl 0: number of endpoint descriptors to follow */
|
||||
12, /* endpoints excl 0: number of endpoint descriptors to follow */
|
||||
USB_CFG_INTERFACE_CLASS,
|
||||
USB_CFG_INTERFACE_SUBCLASS,
|
||||
USB_CFG_INTERFACE_PROTOCOL,
|
||||
@ -90,6 +90,20 @@ char usbDescriptorConfiguration[] = { /* USB configuration descriptor */
|
||||
0x01, /* attrib: Interrupt endpoint */
|
||||
8, 0, /* maximum packet size */
|
||||
1, /* in ms */
|
||||
|
||||
7, /* sizeof(usbDescrEndpoint) */
|
||||
USBDESCR_ENDPOINT, /* descriptor type = endpoint */
|
||||
(char)0x09, /* OUT endpoint number 2 */
|
||||
0x00, /* attrib: Interrupt endpoint */
|
||||
8, 0, /* maximum packet size */
|
||||
0, /* in ms */
|
||||
|
||||
7, /* sizeof(usbDescrEndpoint) */
|
||||
USBDESCR_ENDPOINT, /* descriptor type = endpoint */
|
||||
(char)0x89, /* OUT endpoint number 2 */
|
||||
0x00, /* attrib: Interrupt endpoint */
|
||||
8, 0, /* maximum packet size */
|
||||
0, /* in ms */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -105,7 +105,8 @@ usbMsgLen_t usbFunctionSetup(uchar setupData[8])
|
||||
{
|
||||
case 0x14:
|
||||
return 0xff;
|
||||
|
||||
|
||||
case 0x1:
|
||||
case 0xb0:
|
||||
if (usbData->bmRequestType & USBRQ_DIR_DEVICE_TO_HOST)
|
||||
{
|
||||
|
||||
@ -266,7 +266,7 @@ section at the end of this file).
|
||||
* to fine tune control over USB descriptors such as the string descriptor
|
||||
* for the serial number.
|
||||
*/
|
||||
#define USB_CFG_DEVICE_CLASS 0 /* set to 0 if deferred to interface */
|
||||
#define USB_CFG_DEVICE_CLASS 0xff /* set to 0 if deferred to interface */
|
||||
#define USB_CFG_DEVICE_SUBCLASS 0
|
||||
/* See USB specification if you want to conform to an existing device class.
|
||||
* Class 0xff is "vendor specific".
|
||||
@ -345,7 +345,7 @@ section at the end of this file).
|
||||
*/
|
||||
|
||||
#define USB_CFG_DESCR_PROPS_DEVICE 0
|
||||
#define USB_CFG_DESCR_PROPS_CONFIGURATION (USB_PROP_IS_RAM | USB_PROP_LENGTH(18 + 10 * 7))
|
||||
#define USB_CFG_DESCR_PROPS_CONFIGURATION (USB_PROP_IS_RAM | USB_PROP_LENGTH(18 + 12 * 7))
|
||||
#define USB_CFG_DESCR_PROPS_STRINGS 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_0 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user