Xiangfu Liu wrote:
> I try to add the GET_REPORT to softusb-input. attach it the patch.
> this patch not working. please help me take a look why it always
> give me 'RX timeout error'.

You're issuing a GET_REPORT. But what you want is a GET_DESCRIPTOR
(for the report descriptor).

Not sure if there are any problems in the GET_REPORT (besides not
being what you want). It looked right at a quick glance.

> one question on the GET_REPORT.
>     before get the HID report descriptor. how do I know the REPORT ID
>     since issue the GET_REPORT needs a Report ID as parameter.

This is only an issue with GET_REPORT :-)

>  static char validate_configuration_descriptor(const unsigned char 
> *descriptor,
[...]
> -             if(descriptor[offset+1] == USB_DT_INTERFACE) {
> +             if(descriptor[offset+1] == USB_DT_CONFIG) {
[...]

A lot of ifs. Maybe time to convert this to "case".

> +                     if(!p->mouse.ep) {
>                               p->state = PORT_STATE_RUNNING;
> +                             break;
>                       }

While you're at it, please don't forget the keyboards :)

> +             case PORT_STATE_GET_REPORT: {
> +                     struct setup_packet packet;
> +                     unsigned char report_descriptor[6144];

That's a lot of RAM ! Do we even have that much available in navre ?

By the way, something lovely from
linux/drivers/hid/usbhid/hid-core.c:usbhid_start

        /* Some keyboards don't work until their LEDs have been set.
         * Since BIOSes do set the LEDs, it must be safe for any device
         * that supports the keyboard boot protocol.
         * In addition, enable remote wakeup by default for all keyboard
         * devices supporting the boot protocol.
         */

So we may still need that SET_REPORT ...

- Werner
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode

Reply via email to