Create CONTRIBUTING.md
This commit is contained in:
@@ -10,10 +10,15 @@
|
|||||||
|
|
||||||
## Naming identifiers
|
## 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.
|
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);
|
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.
|
Function scoped variables and function parameters are written with lowerCamelCase.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user