Logo

Contents:

  • 1. Author’s Note
  • 2. Introduction
    • 2.1. Purpose
      • 2.1.1. Primary Gains
    • 2.2. Guiding Principles
    • 2.3. Senior Policy
    • 2.4. Where to Go from Here
  • 3. Development Definitions
  • 4. Names in General
  • 5. Macro Names
    • 5.1. Macro Name Parts
    • 5.2. Using Macros to Force Code Inlining
  • 6. Variable Names
    • 6.1. Variable Name Parts
      • 6.1.1. Scope Prefixes
      • 6.1.2. Type Prefixes
        • 6.1.2.1. Portable Integer Type Prefixes
        • 6.1.2.2. Non-Portable Integer Type Prefixes
        • 6.1.2.3. Enumeration Prefix
        • 6.1.2.4. Supplemental Type Prefixes (see GenericTypeDefs.h and stdbool.h)
      • 6.1.3. Pointer Prefix
      • 6.1.4. Array Prefix
    • 6.2. Constants
    • 6.3. DMA Buffers
    • 6.4. Prefix Exceptions
      • 6.4.1. Illustrative Example
  • 7. Custom Data Types
    • 7.1. <abbreviated_type_name> Prefixes for Custom Data Types
      • 7.1.1. Custom Type Prefix Examples
      • 7.1.2. Spelled-Out Examples
    • 7.2. Other Policies with structs and enums
    • 7.3. Alignment of Field Names In structs
  • 8. Function Names
  • 9. Abbreviations
    • 9.1. Common Abbreviations:
    • 9.2. Common Abbreviations Found in LVGL User Interface Code:
  • 10. Whitespace
  • 11. Alignment
  • 12. Indentation
  • 13. Database Fields
  • 14. Efficiency
    • 14.1. Some Common C Efficiency Tips
  • 15. Formal Arguments
  • 16. Date Format
  • 17. Macro Use Policy
  • 18. DMA Use Policy
  • 19. File Sections
  • 20. Documentation
    • 20.1. Qualities of Good Documentation
      • 20.1.1. Orientation Material Comes First
      • 20.1.2. A Thorough Reference Section Is Present
      • 20.1.3. Search Mechanism
      • 20.1.4. Learning Principle
    • 20.2. Priorities
    • 20.3. Copyright Notice
    • 20.4. File’s Header Documentation Block
    • 20.5. Domain Vocabulary
    • 20.6. Source-File Sections
      • 20.6.1. .H Files
      • 20.6.2. .C Files
    • 20.7. The Main C File Documents The Project
    • 20.8. Clusters
    • 20.9. Doxygen Comments
    • 20.10. Commenting Out Blocks of Code
    • 20.11. Function Definitions
    • 20.12. Cross-Reference Pages
    • 20.13. Doxygen Use Policy
  • 21. Include Policy
  • 22. VB.NET and C#
    • 22.1. Namespaces and Type Name Conflicts
  • 23. Appendix A — Design by Contract Details
    • 23.1. Commands and Queries
      • 23.1.1. Note on Command/Query Separation
  • 24. Appendix B — Change Log
  • 25. Glossary
  • 26. Bibliography
    • 26.1. Articles on Documentation-Driven Development

Quick-Start for Embedded C Systems:

  • 1. Quick-Start Rules for Embedded C Systems
    • 1.1. Compiler Warnings
    • 1.2. Line Widths
    • 1.3. Braces
    • 1.4. Parentheses
    • 1.5. const Keywoard
    • 1.6. static Keyword
    • 1.7. volatile Keyword
    • 1.8. Comments
    • 1.9. Portability
    • 1.10. Bit-Wise Operations on Signed Integers
    • 1.11. Integer Type Consistency
    • 1.12. Ambiguous Meaning of double with XC Compilers
    • 1.13. Comma Operator
    • 1.14. char Keyword
    • 1.15. Data Type Names
    • 1.16. Structured Code
    • 1.17. Subsystems
    • 1.18. Shared Code
    • 1.19. Indenting Compiler Directives
    • 1.20. Code Location
    • 1.21. Module Documentation
    • 1.22. Use Doxygen Documentation
    • 1.23. Things That Happen Once
Our Coding Standards
  • Search


© Copyright 2012-2025 Crystal-Clear Research, Inc. All rights reserved. Last updated on 21-May-2025.

Built with Sphinx using a theme provided by Read the Docs.