Update CONTRIBUTING.md

This commit is contained in:
László Monda
2016-12-11 23:33:13 +01:00
committed by GitHub
parent 7bebaff8dd
commit a257e55403

View File

@@ -72,3 +72,40 @@ void do_this()
```
myFunction();
```
## Header file structure
Header files are composed of sections. The order of sections is fixed. Every header file is guarded by a file-wide `#ifndef`.
```
#ifndef __LED_DRIVER_H__
#define __LED_DRIVER_H__
// Includes:
#include "fsl_gpio.h"
...
// Macros:
#define LED_DRIVER_SDB_PORT PORTA
...
// Typedefs:
typedef struct {
...
} led_driver_state_t;
// Variables:
extern led_driver_state_t ledDriverState;
...
// Functions:
extern void LedDriver_WriteBuffer(uint8_t i2cAddress, uint8_t buffer[], uint8_t size);
...
#endif
```