C code style and coding rules

I’ve been trying to make my own C code style and coding rules approach, to be used in all my libs.

From my first coding experience till today, I changed style many times, from first STM32F4 Library to latest projects, such as ESP_AT_Lib, onewire_uart and others.

 

Code style rules are published and regularly updated on my Github account, under c_code_style repository name. Please use URL below to access website:

https://github.com/MaJerle/c_code_style

It was originally inspired by LwIP coding style with some modification. Document today covers:

  • General rules like opening brackets, tabs size, etc
  • Function syntax
  • Comments and documentation
  • Structures/Enumerations
  • Macros

In case you would add some part or modify existing, feel free to propose in repository itself.

tilz0R

Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...