Hal Driver Rules; Hal Api Naming Rules; Table 6: Hal Api Naming Rules - ST STM32F2 User Manual

Description of stm32f2 hal and low layer drivers
Hide thumbs Also See for STM32F2:
Table of Contents

Advertisement

Overview of HAL drivers
IP/Module
stm32f2xx_ll_rng.c
stm32f2xx_ll_rtc.c
stm32f2xx_ll_spi.c
stm32f2xx_ll_tim.c
stm32f2xx_ll_usart.c
stm32f2xx_ll_utils.c
2.5

HAL driver rules

2.5.1

HAL API naming rules

The following naming rules are used in HAL drivers:
File
names
Module
name
Function
name
Handle
name
Init
structure
name
Enum
name
The PPP prefix refers to the peripheral functional mode and not to the peripheral itself.
For example, if the USART, PPP can be USART, IRDA, UART or SMARTCARD
depending on the peripheral mode.
The constants used in one file are defined within this file. A constant used in several
files is defined in a header file. All constants are written in uppercase, 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 uppercase and
uses the same acronyms as in thestm32f2xx reference manuals.
Peripheral registers are declared in the PPP_TypeDef structure (e.g. ADC_TypeDef)
in stm32f2xxx.h header file.stm32f2xxx.h corresponds to stm32f205xx.h ,
stm32f215.h, stm32f207xx.h or stm32f217xx.h.
Peripheral function names are prefixed by HAL_, then the corresponding peripheral
acronym in uppercase followed by an underscore. The first letter of each word is in
uppercase (e.g. HAL_UART_Transmit()). Only one underscore is allowed in a function
name to separate the peripheral acronym from the rest of the function name.
36/1371
STM32F205xx
Yes
Yes
Yes
Yes
Yes
Yes

Table 6: HAL API naming rules

Generic
stm32f2xx_hal_ppp (c/h)
HAL_PPP_Function
HAL_PPP_FeatureFunctio
n_MODE
PPP_HandleTypedef
PPP_InitTypeDef
HAL_PPP_Structname
TypeDef
DocID028236 Rev 2
STM32F215xx
Yes
Yes
Yes
Yes
Yes
Yes
Family specific
stm32f2xx_hal_ppp_ex (c/h)
HAL_PPP_ MODULE
HAL_PPPEx_Function
HAL_PPPEx_FeatureFunction_
MODE
NA
NA
NA
STM32F207xx
STM32F217xx
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Device specific
stm32f2xx_ hal_ppp_ex (c/h)
HAL_PPPEx_Function
HAL_PPPEx_FeatureFunction_
MODE
NA
PPP_InitTypeDef
NA
UM1940

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF