Variables
- Variables should be named in lower snake case. ie. `this_is_a_variable`.
- Absolutely no exposing of global variables. All components should implement accessor methods, if applicable.
- Variables in c files should be declared as static if they are outside the scope of any function.
Example
/**
* @file SomeFile.c
* @author The Grinch
* @date March 5, 2012
*/
//BAD
int someGlobalVariable = 0;
//GOOD
static int16_t some_nice_variable = 0;
Types
For code portability and easier unit testing, please
0 Comments