个人的代码组织风格如下所示:
.c .h
+-------------------------+ +-------------------------+
|[File Header] | |[File Header] |
+-------------------------+ +-------------------------+
|[Include] | |[Include] |
| #include System | | #include System |
| #include SDK | | #include SDK |
| #include Local | | #include Local |
+-------------------------+ +-------------------------+
|[Declaration] | |[Declaration] |
| #define | | #define |
| | | |
| data declarations | | data declarations |
| Private | | Public |
| | | |
| function declaration | | function declaration |
| Private | | Public |
+-------------------------+ +-------------------------+
|[Implementations] |
| common/util/helper |
| |
| Usecase/Handler |
| case1 |
| step1 |
| step2 |
| ... |
| ... |
| |
| callback/statemachine |
+-------------------------+