diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36c5c4f..b1a3538 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,10 +10,15 @@ ## Naming identifiers -Functions are written with UpperCamelCase and verb is followed by noun. +Extern functions and variables are written with UpperCamelCase, non-extern functions and variables are written with lowerCamelCase. + +Function names are composed of a verb followed by a noun. ``` -DoThis(); +DoThisExtern(); +doThisNonExtern(); +uint8 ExternVariable; +uint8 nonExternVariable; ``` Whenever a file exposes a group of functions as a consistent API, their function names should be prefixed with the group name, followed by `_`, followed by the individual function names. @@ -24,12 +29,6 @@ void LedDriver_WriteRegister(uint8_t i2cAddress, uint8_t reg, uint8_t val); void LedDriver_SetAllLedsTo(uint8_t val); ``` -Non-function scoped variables are written with UpperCamelCase. - -``` -uint8_t OuterVariable; -``` - Function scoped variables and function parameters are written with lowerCamelCase. ```