Hal General Naming Rules; Table 7: Macros Handling Interrupts And Specific Clock Configurations - ST STM32F2 User Manual

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

Advertisement

UM1940
The structure containing the PPP peripheral initialization parameters are named
PPP_InitTypeDef (e.g. ADC_InitTypeDef).
The structure containing the Specific configuration parameters for the PPP peripheral
are named PPP_xxxxConfTypeDef (e.g. ADC_ChannelConfTypeDef).
Peripheral handle structures are named PPP_HandleTypedef (e.g
DMA_HandleTypeDef)
The functions used to initialize the PPP peripheral according to parameters specified
in PPP_InitTypeDef are named HAL_PPP_Init (e.g. HAL_TIM_Init()).
The functions used to reset the PPP peripheral registers to their default values are
named PPP_DeInit, e.g. TIM_DeInit.
The MODE suffix refers to the process mode, which can be polling, interrupt or DMA.
As an example, when the DMA is used in addition to the native resources, the function
should be called:HAL_PPP_Function_DMA ().
The Feature prefix should refer to the new feature.
Example: HAL_ADC_Start() refers to the injection mode
2.5.2

HAL general naming rules

For the shared and system peripherals, no handle or instance object is used. This rule
applies to the following peripherals:
Example: The HAL_GPIO_Init() requires only the GPIO address and its configuration
parameters.
HAL_StatusTypeDef HAL_GPIO_Init (GPIO_TypeDef* GPIOx, GPIO_InitTypeDef *Init)
{
/*GPIO Initialization body */
}
The macros that handle interrupts and specific clock configurations are defined in
each peripheral/module driver. These macros are exported in the peripheral driver
header files so that they can be used by the extension file. The list of these macros is
defined below: This list is not exhaustive and other macros related to peripheral
features can be added, so that they can be used in the user application.
__HAL_PPP_ENABLE_IT(__HANDLE__, __INTERRUPT__)
__HAL_PPP_DISABLE_IT(__HANDLE__, __INTERRUPT__)
__HAL_PPP_GET_IT (__HANDLE__, __ INTERRUPT __)
__HAL_PPP_CLEAR_IT (__HANDLE__, __ INTERRUPT __)
__HAL_PPP_GET_FLAG (__HANDLE__, __FLAG__)
__HAL_PPP_CLEAR_FLAG (__HANDLE__, __FLAG__)
GPIO
SYSTICK
NVIC
RCC
FLASH.

Table 7: Macros handling interrupts and specific clock configurations

Macros
__HAL_PPP_ENABLE(__HANDLE__)
DocID028236 Rev 2
Overview of HAL drivers
Description
Enables a specific peripheral
interrupt
Disables a specific peripheral
interrupt
Gets a specific peripheral interrupt
status
Clears a specific peripheral
interrupt status
Gets a specific peripheral flag
status
Clears a specific peripheral flag
status
Enables a peripheral
37/1371

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

Subscribe to Our Youtube Channel

Table of Contents

Save PDF