typedef struct
{
usb_descriptor_configuration_struct Config;
usb_descriptor_interface_struct HID_Interface;
usb_hid_descriptor_hid_struct HID_VendorHID;
usb_descriptor_endpoint_struct HID_ReportINEndpoint;
usb_descriptor_endpoint_struct HID_ReportOUTEndpoint;
} usb_descriptor_configuration_set_struct;
上面是提供的自定义HID例程上的结构体定义,直接可以识别和发送接收数据。
后来需要个接口,我就重新加了接口 usb_descriptor_interface_struct HID_Interface, HID1_Interface; ,其他什么都没变,就不能识别USB
下面是改的
typedef struct
{
usb_descriptor_configuration_struct Config;
usb_descriptor_interface_struct HID_Interface, HID1_Interface;
usb_hid_descriptor_hid_struct HID_VendorHID;
usb_descriptor_endpoint_struct HID_ReportINEndpoint;
usb_descriptor_endpoint_struct HID_ReportOUTEndpoint;
} usb_descriptor_configuration_set_struct;
|