Hallo zusammen,
ich versuche grad mein funktionierendes USB Device (HID auf KeilBoard)
in ein funktioniernes Bulk Device umzubauen (in Verbindung mit
bulkusb.sys). Nur hab ich Probleme die Descriptoren umzubauen. Mein
Versuch war dieser:
const BYTE USB_DeviceDescriptor[] _attribute_ ((_aligned_ (4))) = {
USB_DEVICE_DESC_SIZE, /* bLength */
USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
WBVAL(0x0110), /* 1.10 */ /* bcdUSB */
0xFF, /* bDeviceClass */
0xFF, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
};
aber wie ich die 2 bulk (in/out) entdpointzs hinbekomm hab ich keine
ahnung :(
vielleicht hat hier jamand so etwas in diese richting schon gemacht.
grüße nils
Soooo, das hier schein zu klappen, zumindest erkennt er das Gerät.
const BYTE USB_ConfigDescriptor[] _attribute_ ((_aligned_ (4))) = {
/* Configuration 1 */
USB_CONFIGURATION_DESC_SIZE, /* bLength */
USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
WBVAL( /* wTotalLength */
USB_CONFIGURATION_DESC_SIZE +
USB_INTERFACE_DESC_SIZE /*+
HID_DESC_SIZE +
USB_ENDPOINT_DESC_SIZE*/
),
0x01, /* bNumInterfaces */
0x01, /* bConfigurationValue */
0x00, /* iConfiguration */
USB_CONFIG_BUS_POWERED | /* bmAttributes */
USB_CONFIG_REMOTE_WAKEUP,
USB_CONFIG_POWER_MA(100), /* bMaxPower */
/* Interface 0, Alternate Setting 0, HID Class */
USB_INTERFACE_DESC_SIZE, /* bLength */
USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
0x00, /* bInterfaceNumber */
0x00, /* bAlternateSetting */
0x02, /* bNumEndpoints */
USB_DEVICE_CLASS_VENDOR_SPECIFIC, /* bInterfaceClass */
USB_DEVICE_CLASS_VENDOR_SPECIFIC, /* bInterfaceSubClass */
0x00, /* bInterfaceProtocol */
0x64 /* iInterface */
};
Antwort schreiben
Bitte melde dich an, um einen Beitrag zu schreiben.