EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #15 background imageLoading...
Page #15 background image
UM1581
STM32F30xx Standard Peripheral Library
DocID023800 Rev 1
15/584
 System and source/header file names are preceded by „stm32f30x_‟, for example
stm32f30x_conf.h even if they are valid both for STM32F30xx and STM32F31xx
microcontrollers.
ï‚· Constants used in one file are defined within this file. A constant used in more than
one file is defined in a header file. All constants are written in upper case, except for
peripheral driver function parameters.
ï‚· typedef variable names should be suffixed with _TypeDef.
ï‚· Registers are considered as constants. In most cases, their name is in upper case and
uses the same acronyms as in the STM32F30xx reference manual document.
ï‚· Peripheral registers are declared in the PPP_TypeDef structure (e.g. ADC_TypeDef)
in stm32f30x.h file.
ï‚· The peripheral function names are preceded by the corresponding peripheral acronym
in upper case followed by an underscore. The first letter in each word is in upper case,
for example USART_SendData. Only one underscore is allowed in a function name to
separate the peripheral acronym from the rest of the function name.
ï‚· The structure containing the initialization parameters for the PPP peripheral are
named PPP_InitTypeDef (e.g. ADC_InitTypeDef).
ï‚· The functions used to initialize the PPP peripheral according to parameters specified
in PPP_InitTypeDef are named PPP_Init, e.g. TIM_Init.
ï‚· The functions used to reset the PPP peripheral registers to their default values are
named PPP_DeInit, e.g. TIM_DeInit.
ï‚· The functions used to fill the PPP_InitTypeDef structure with the reset values of each
member are named PPP_StructInit, e.g. USART_StructInit.
ï‚· The functions used to enable or disable the specified PPP peripheral are named
PPP_Cmd, for example USART_Cmd.
ï‚· The functions used to enable or disable an interrupt source for the specified PPP
peripheral are named PPP_ITConfig, e.g. RCC_ITConfig.
ï‚· The functions used to enable or disable the DMA interface for the specified PPP
peripheral are named PPP_DMAConfig, e.g. TIM_DMAConfig.
ï‚· The functions used to configure a peripheral function always end with the string
„Config‟, for example GPIO_PinAFConfig.
ï‚· The functions used to check whether the specified PPP flag is set or reset are named
PPP_GetFlagStatus, e.g. I2C_GetFlagStatus.
ï‚· The functions used to clear a PPP flag are named PPP_ClearFlag, for example
I2C_ClearFlag.
ï‚· The functions used to check whether the specified PPP interrupt has occurred or not
are named PPP_GetITStatus, e.g. I2C_GetITStatus.
ï‚· The functions used to clear a PPP interrupt pending bit are named
PPP_ClearITPendingBit, e.g. I2C_ClearITPendingBit.
1.1.3 Coding rules
This section describes the coding rules used in the library.
General
ï‚· All codes should comply with ANSI C standard and should compile without warning
under at least its main compiler. Any warnings that cannot be eliminated should be
commented in the code.
ï‚· The library uses ANSI standard data types defined in the ANSI C header file
<stdint.h>.
ï‚· The library has no blocking code and all required waiting loops (polling loops) are
controlled by an expiry programmed timeout.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals