This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Expanding In/Out Reports on Keil USB HID example code

I'm implementing an HID class device and have based my program on the HID USB program supplied by Keil. I'm new to USB but am a fairly experienced programmer otherwise.

I have got a basic program working fine bit with single byte input and output reports. I've tested the functionality using a client called SimpleHIDWrite.exe

I need to expand both in and out reports to 8 bytes each to communicate with the host. Has anybody successfully modified this example program or does anyone have any advice on how to do it properly?

My guess is that I need to edit the report descriptor and also set up the inreport and outreport as arrays. Is there anything I need to watch out for?

My target is the LPC2141.

Any advice or information would be much appreciated!

Thanks,
Gareth.

Parents
  • Hi Tsuneo,

    So much information - THANKS!!!!
    I will need to work through it slowly to make sure I understand the changes!

    The last section - specific to my application for receiving commands and replying with the required report I understand!

    The section about creating OUT EP I understand!

    I wasn't so sure about the purpose of the loop backs and feature reports ... are these changes required for my application? If so, could you provide a (very) brief explanation?

    Gareth.

Reply
  • Hi Tsuneo,

    So much information - THANKS!!!!
    I will need to work through it slowly to make sure I understand the changes!

    The last section - specific to my application for receiving commands and replying with the required report I understand!

    The section about creating OUT EP I understand!

    I wasn't so sure about the purpose of the loop backs and feature reports ... are these changes required for my application? If so, could you provide a (very) brief explanation?

    Gareth.

Children
  • I wasn't so sure about the purpose of the loop backs and feature reports ... are these changes required for my application? If so, could you provide a (very) brief explanation?

    Loop back is the basics for the development of communication code. :-)
    It's good for debug.
    I recommend you to implement the loopback first, as the snippet does. And run it on Jan's PC app for confirmation.
    Loop back code is easily modified into query-reply communication, as you see in above mods.

    Feature reports are implemented because Jan's PC app supports them. Just for completeness. :-)
    Anyway, the mods for feature report take no more than a couple of lines of the code.

    Tsuneo

  • Hi Tsuneo,

    I had sort of worked out that the loop back was a 'stepping stone' to be able to get where I want to be! Thanks for confirming - also on the feature reports.

    I'll start my changes this afternoon and let you know how I get on. I have re-read everything you have sent and I am starting to understand the structure better - things starting to become clearer.

    ALSO I think I got my IN's and OUT's mixed up in one of my earlier responses! I meant - create and OUT EP (not IN) - but you have pointed that out (in a very patient and kind way!)

    So - I will proceed with care and make the changes!!!!

    Gareth.