|USB : USB Classes Software for HID devices|
Software for the peripheral device has to do the usual stuff that any microcontroller software must do, like declare all the variables, initialize all the hardware, and set up a main loop that performs whatever work the device must do.
In addition, it has to have extra USB stuff in it as well, such as the complicated USB descriptor tables, code to initialize and start up the USB engine, code to run the USB engine, and of course, code to pack the data into packets that are going IN to the PC, and unpack any data that comes OUT from the PC.
The microcontroller code has to do everything, because there is no operating system like Windows there to do any of the work for us.
|1 2 3 4 5 6 7|