| Electronic Components Datasheet Search |
|
UM0097 Datasheet(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0097 Datasheet(HTML) 7 Page - STMicroelectronics |
|
7 / 229 page ![]() UM0097 Document and library rules 7/229 1.3 Naming conventions The Firmware Library uses the following naming conventions: ● PPP is used to reference to any peripheral acronym, e.g. ADC. See the section above for more information on peripheral acronyms. ● System and source/header file names must be preceded by ‘71x_’, e.g. 71x_conf.h, except driver source code and header files for PPP peripheral, e.g. 71x_tim.h. Only lower case letters, digits, underscore and at most one suffix are allowed in filenames. ● Constants used in one file are defined at the head of that file. A constant used in more than one file should be defined in a header file. All constants use upper case characters. ● Registers are considered as constants. Their names are in upper case letters and have in most case the same acronyms as in the STR71x reference manual document. ● Variable names are preceded with a letter which indicates the type/size of the variable (b:8 bits, w: 16 bits, d: 32 bits, p: pointer). The variables are in lower case and each word begins with an upper case, e.g. bVariable, pPointer. ● Peripheral function names are preceded with the corresponding peripheral acronym in upper case followed by an underscore. The first letter in each word is upper case, e.g. EIC_CurrentIRQChannelValue. Only one underscore is allowed in a function name to separate the peripheral acronym from the rest of the function name. ● Functions declared locally don’t have any prefix. ● Functions used to initialize a peripheral are named PPP_Init, e.g. PCU_Init. ● Functions for checking whether the specified PPP flag is set or not end with status, e.g. TIM_FlagStatus. ● Functions used to configure a peripheral functionality end with config, e.g. WDG_PrescalerConfig. Functions that configure a peripheral interrupt are called PPP_ITConfig. ● Functions performing a specific action have a name that ends with a verb describing that action, e.g. activate, clear, send, write... ● Functions clearing specific peripheral flags are called PPP_FlagClear. 1.4 C coding rules The following rules are used in the Firmware Library. ● 12 generic types are defined for variables whose type and size are fixed, and are typically used for register access. These types are defined in the file 71x_type.h: typedef unsigned long u32; typedef unsigned short u16; typedef unsigned char u8; typedef signed long s32; typedef signed short s16; typedef signed char s8; typedef volatile unsigned long vu32; typedef volatile unsigned short vu16; typedef volatile unsigned char vu8; |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |