2018-03-04 06:35 AM
If I am not mistaken some variables on the USB code use hungarian notation e.g. bRequest, wValue, wIndex etc.
However there is one prefix that I don't know what it means bmRequest.
Is it something like multiple bits because it is like a bitfield?
Is there a link that explains the conventions used? Are there any other non standard ones that I may not have spotted yet.
Cheers,
Sat
#hungarian #notation #usb #stm32-stm32cube2018-03-04 06:48 AM
bmRequest is documented here for example:
2018-03-04 07:53 AM
My question is coming from this document. I am asking about the prefix not what the variable does.
2018-03-04 08:15 AM
The notation matches that of USB specification (Microsoft played part in developing it, and Simonyi developed that notation while at Microsoft, the years roughly match), see the dreaded chapter 9. It does not strictly denote type - while b is for byte and w is for [16-bit] word, bm is there for bitmap (an item where individual bits or groups of few bits have ditinct meanings, in the basic document it's usually byte but in class documents there are multiple-byte bitmaps, too), i for index (the only usage I've seen is index to the strings pool, a byte), bcd for binary-coded-decimal (usually version number and it's usually two bytes).
JW
2018-03-04 08:28 AM
Sorry I miss-interpreted the sentence: 'I don't know what it means bmRequest.'