Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.38 KB

CODING_STYLE.md

File metadata and controls

29 lines (19 loc) · 1.38 KB

Firmware commands name rules

Commands name rules are used by tokeline "t_token_dict" like for example in https://github.com/bvernoux/hydrafw/blob/master/hydrabus/commands.c

basic rules: no capital letters or _ in keywords please, this keeps it consistent use - for space instead, like write-mode or whatever

C code conventions

When writing new C code, please adhere to the following conventions.

Coding Style of the project: Linux Kernel coding style see: https://www.kernel.org/doc/Documentation/CodingStyle

Configuration of Linux Kernel coding style with AStyle

Can be also done automatically with open source tool AStyle: http://astyle.sourceforge.net/ With following syntax: AStyle.exe -t --style=linux --lineend=linux my_c_file.c

Syntax tested with AStyle_2.05.1

Configuration of Linux Kernel coding style with EmBitz

Menu Settings -> Editor -> General settings:

General settings

Menu Settings -> Editor -> Source fomatter Tab Style:

Source fomatter Tab Style

Menu Settings -> Editor -> General settings Tab Indentation:

Source fomatter Tab Indentation