Perla,
Thanks for your help, I now have two HID input devices showing in windows device manager along with a USB Composite device controller.
Unfortunately, windows is not starting the device showing a 'This device cannot start. (Code 10)' in the properties.
Do you have any further suggestions on where I'm going wrong?
Thanks, Julian
Here is my configuration descriptor:
uint_8 USB_DESC_CONST g_config_descriptor_composite[CONFIG_DESC_SIZE_COMPOSITE] =
{
CONFIG_ONLY_DESC_SIZE, /* Configuration Descriptor Size - always 9 bytes*/
USB_CONFIG_DESCRIPTOR, /* "Configuration" type of descriptor */
CONFIG_DESC_SIZE_COMPOSITE, 0x00, /* Total length of the Configuration descriptor */
2, /* NumInterfaces */
1, /* Configuration Value */
0, /* Configuration Description String Index*/
BUS_POWERED|SELF_POWERED|(REMOTE_WAKEUP_SUPPORT<<REMOTE_WAKEUP_SHIFT),
/* S08/CFv1 are both self powered (its compulsory to set bus powered)*/
/* Attributes.support RemoteWakeup and self power */
0x32, /* Current draw from bus */
/* Interface 0 Descriptor */
IFACE_ONLY_DESC_SIZE, /* Size */
USB_IFACE_DESCRIPTOR, /* INTERFACE descriptor type */
0x00, /* Index of this interface */
0x00, /* Index of this alternate setting */
HID_DESC_ENDPOINT_COUNT, /* endpoint */
0x03, /* USB DEVICE CLASS */
0x01, /* SUBCLASS */
0x01, /* 0x01 for keyboard */
0x00,
/*Endpoint 0 descriptor */
ENDP_ONLY_DESC_SIZE,
USB_ENDPOINT_DESCRIPTOR,
HID_ENDPOINT|(USB_SEND << 7),
USB_INTERRUPT_PIPE,
HID_ENDPOINT_PACKET_SIZE, 0x00,
0x0A, /* Poll at least every 10ms */
/* Interface 1 Descriptor */
IFACE_ONLY_DESC_SIZE, /* Size */
USB_IFACE_DESCRIPTOR, /* INTERFACE descriptor type */
0x01, /* Index of this interface */
0x00, /* Index of this alternate setting */
HID_DESC_ENDPOINT_COUNT, /* endpoint */
0x03, /* USB DEVICE CLASS */
0x01, /* SUBCLASS */
0x02, /* 0x02 for mouse */
0x00,
/*Endpoint 1 descriptor */
ENDP_ONLY_DESC_SIZE,
USB_ENDPOINT_DESCRIPTOR,
HID_ENDPOINT|(USB_SEND << 7),
USB_INTERRUPT_PIPE,
HID_ENDPOINT_PACKET_SIZE, 0x00,
0x0A, /* Poll at least every 10ms */
/* HID descriptor */
HID_ONLY_DESC_SIZE,
USB_HID_DESCRIPTOR,
0x00,0x01,
0x00,
0x01,
0x22,
REPORT_DESC_SIZE_COMPOSITE, 0x00 /* report descriptor size to follow */
};