Commit Graph

2 Commits (16d30776aa1ba5b6aa1f8cbe9f2acdd7de841015)

Author SHA1 Message Date
Martin Kojtal 7ba0e90f02 AStyle: options update
This should reflect these rules that we have defined since mbed 2:

```
Indentation - 4 spaces. Please do not use tabs.
Braces - K&R (see the exception 1 TBS below)
1 TBS -use braces for statements if, else, while, for (exception from K&R) Reference: http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS
One line per statement
Preprocessor macro starts at the beginning of a new line, the code inside is indented accordingly the code above it
Cases within switch are indented (exception from K&R)
Space after statements if, while, for, switch, same applies to binary and ternary operators
Each line has preferably at most 120 characters
For pointers, '*' is adjacent to a data name (analogin_t *obj) or a function name (analog_t *get_analogin_object())
Don't leave trailing spaces at the end of lines
Empty lines should have no trailing spaces
Unix line endings are default option for files
Use capital letters for macros
A file should have an empty line at the end
```
2018-04-19 12:55:08 +01:00
Martin Kojtal f07cf4cf5d Add Astyle configuration file for mbed OS
This follows what is in the codebase in most cases (K&R with few exceptions).
This should follow also how online compiler formats the code.
2018-04-19 12:55:07 +01:00