1, the System file name and the source file name in the form of ' stm32f10x_ '.
2. Constants used in a single file are defined in the file. Constants used in multiple files are defined in the header file. All constants are represented in uppercase letters.
3, register as a constant view, also in uppercase letters, in most cases, in the stm3210x reference manual using the same abbreviation.
4, the peripheral module function of the name, need to have the corresponding peripheral module abbreviation underlined such prefix, each word to capitalize the first character. For example Spi_senddata, in a function name, only one underline is allowed to distinguish between the peripheral module abbreviation and the remaining function name.
5. Use the parameters specified in X_inittypedef to initialize the function of the X peripheral module, which is named X_init.
6, reset the X peripheral module register as the default value of the function, named X_deinit.
7. Set each member of the x_inittypedef struct as a function of the reset value, named X_structinit.
8, used to enable or prohibit the specified X peripheral function, named X_cmd.
9, to enable or prohibit the specified X peripheral module of an interrupt resource function, named X_itconfig.
10. A function for enabling or prohibiting the DMA interface of the specified X peripheral module, named X_dmaconfig.
11, the function used to set a peripheral module, always end with the string ' Config '.
12. Used to verify that the flag specified by x is named X_getflagstatus by the function of position or zeroing.
13, used to clear the flag function of an x, named X_clearflag
14. A function to verify that the interrupt of the specified x is occurring, named X_getitstatus
15. A function to clear an X interrupt suspend bit, named X_clearitpendingbit
STM32 Firmware Library naming rules