For functions and variables, you should start with capital case characters, and for each word, you should start with capital characters. You should not use underline
_ on these names.
For structures and enum names, you should write them all in capital characters and separate each word by one underline
We use this clang-format for writing codes in our C driver.
Please make sure to format the code using clang format's visual studio extension or clang command-line tools.
Putting comments on the code is very important. This way, other people can understand your code better and will be used for further improvement.
Please put the comment in this style.
//// This is my comment line 1// This is my comment line 2//
All global variables should start with
g_ for example
For drivers, file names start with a capital case character.
For user-mode codes, file names start with lower case characters.