我改了描述符
/******************** Descriptor of Joystick Mouse endpoint1_in ********************/
/* 27 */
0x07, /*bLength: Endpoint Descriptor size*/
USB_ENDPOINT_DESCRIPTOR_TYPE, /*bDescriptorType:*/
0x81, /*bEndpointAddress: Endpoint Address (IN)*/
0x02, /*bmAttributes: bulk endpoint*/我改过了的
0x04, /*wMaxPacketSize: 4 Byte max */
0x00,
0x00, /*bInterval: Polling Interval (32 ms)*/
/* 34 */
和prop.c中的
void Joystick_Reset(void)
{
/* Set Joystick_DEVICE as not configured */
pInformation->Current_Configuration = 0;
pInformation->Current_Interface = 0;/*the default Interface*/
/* Current Feature initialization */
pInformation->Current_Feature = Joystick_ConfigDescriptor[7];
#ifdef STM32F10X_CL
/* EP0 is already configured in DFU_Init() by USB_SIL_Init() function */
/* Init EP1 IN as OTG_DEV_EP_TYPE_BULK endpoint */
OTG_DEV_EP_Init(EP1_IN, OTG_DEV_EP_TYPE_BULK , 4);//我改的
|