USB : USB Classes    Packing and Unpacking  

Here's all you do in the peripheral device code:

  • For data items that go IN to the PC, we provide commented sections in the code where you should put values into those variables, just before the data gets sent to the PC, like this example in C:
  • For data items that go OUT from the PC, we provide commented places in the code where an Output Report has just arrived, so you can simply do whatever you want to do with the data that just got here.
  • If your device uses bidirectional Feature items, your custom generated peripheral code also has specially marked places for you to either handle new values sent OUT from the PC, or where you can update the values of Feature items before you send them IN to the PC.

 As we'll show in the HIDmaker FS walkthrough, there are similar places in the custom generated PC code as well where you can either put values into variables before sending data OUT to the peripheral, or where you can make use of data that has just come IN from the peripheral device.


11 of 14
Copyright Notice and Author Information