USB : USB Classes    Packing and Unpacking  

It's hard to do packing and unpacking of odd sized data items in a microcontroller, always get it right, and still do it fast enough. But that's just what HIDmaker FS does for you, on both the peripheral side and the PC side of the USB cable.

Let's take a closer look at that example again, to see what we mean. This shows a small (4 byte long) Feature Report for a device that has a 2 line x 16 character LCD display.

Note that this is a bidirectional Feature Report, which can be sent IN from the peripheral device to the PC, or OUT from the PC to the device. That means that both the PC software and the peripheral firmware must be able to both pack and unpack this Feature Report.

 


4 of 14
Copyright Notice and Author Information