1, the function pointer type definition, then the pointer struct type definition, the final call form is aaa.bbb (); (AAA is a struct variable) or
AAA->BBB (); (AAA is a struct pointer), function pointers are best packaged in a struct to become pointer structures, encapsulating multiple types.
function pointer to synthesize a struct.
2. Encapsulation of common macro functions
3. Use of event-bit macro definitions
4, the structure definition, the member is the structure body, constructs the more complex data structure.
5. Use extern to declare external variables and external functions in the header file.
6. Use the precompiled macro switch to control whether the header file is included or not and whether the statement is compiled or not.
7, the use of bit segments can save RAM space.
8. The enumeration variable is incremented by default from 0, or it can be assigned to a different value from one of the beginning, followed by a re-increment.
9. Put some macro definitions, data structure type definition, external variable declaration, external function declaration in the header file.
10, the source file in the macro definition, data structure type definition, static variables, static function declaration, function implementation.
11, the essence of the function is 3 big program structure--order structure, cycle structure, select structure, these kinds of structure mix constitute the procedure.
12. Array of string pointer constants
13, external variables in the header file with an extern representation declaration (declaration, cannot be initialized), in the source file defined variables (defined, can be initialized
Uninitialized).
14, the Declaration of the header file, the function before the extern expression declaration, the variable before the addition of extern representation declaration.
15. When defining and initializing a struct, assign a value to the struct member and add a point to the member name to indicate the assignment. As shown below:
{
. PINSDA = BOARD_SDA,
. PINSCL = BOARD_SCL
}
C Language Grammar