圈圈教你玩usb中get_descriptor请求的wValue是16位在STM32中是8位吗,如果是REPORT_DESCRIPTOR是0x22 HID_DESCRIPTOR_TYPE是0x21 如果前一个2指的是配置描述符那后一个数指的什么 我哪里理解错了
RESULT Joystick_Data_Setup(uint8_t RequestNo)
{
uint8_t *(*CopyRoutine)(uint16_t);
CopyRoutine = NULL;
if ((RequestNo == GET_DESCRIPTOR)
&& (Type_Recipient == (STANDARD_REQUEST | INTERFACE_RECIPIENT))
&& (pInformation->USBwIndex1 == 0))
{
if (pInformation->USBwValue1 == REPORT_DESCRIPTOR) //这个位置
{
CopyRoutine = Joystick_GetReportDescriptor;
}
else if (pInformation->USBwValue1 == HID_DESCRIPTOR_TYPE) //这个位置
{
CopyRoutine = Joystick_GetHIDDescriptor;
}
} /* End of GET_DESCRIPTOR */
|