USB : USB Classes    USB Classes for Microcontrollers  

HID class does this by being centered on individual data items, rather than anonymous streams of data that you have to manage yourself.

Think about this: the CDC USB class, and the "No Class" generic Bulk approach, only go as far as to set up a data stream.  You still have to write (a lot of) extra code, on both the peripheral side and the PC Host side to

  1. put data into that stream, and
  2. to extract data from that stream.

And you have to make sure that your code always knows where each data is, and how big it is, AND that the two sides (peripheral and host) are always in agreement about what data one side thinks it is sending and what the other side thinks it is receiving.

With HID class, you are sending and receiving data items, that are already organized for you into predefined Reports, so both sides are always in sync.


22 of 29
Copyright Notice and Author Information