October 30, 2023

Let's learn USB! -- "official" USB variable names

If you look at the wretched "cube" code from ST, you will see variable names and especially structure members with names like this:
USBwValue
USBwIndex0
Ctrl_Info.Usb_wOffset
Ctrl_Info.Usb_wLength
These are just examples. This is not just part of the "insanity" in the nasty "cube" code, but these names are actually used in the USB documents and there is some merit to retaining them to retain the connection to the documents. Maybe.

Read some of the scathing comments in the papoon project documents and you may think twice about all of this. The papoon project did not seem to go out of its way to mimic the naming in the USB documents, and it only seems to be done in a limited way in TinyUSB.

The official documents (in this case the USB 2.0 standard specification) are here. The USB 2.0 specification PDF file is a 650 page document.

We will keep this business of naming conventions in mind, but make no decision at this point.


Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]