Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

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


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.