HAL_ADCEx_InjectedConfigChannel()
This function configures the selected ADC Injected channel
(corresponding rank in the sequencer and sample time)
2.7.2 HAL extension model cases
The specific IP features can be handled by the HAL drivers in five different ways. They are
described below.
Case 1: Adding a family-specific function
In this case, the API is added in the extension driver C file and named
HAL_PPPEx_Function ().
Figure 2: Adding family-specific functions
Example: stm32f2xx_hal_adc_ex.c/h
HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc);
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc);
Case 2: Adding a new peripheral (specific to a device belonging to a given
family)
When a peripheral which is available only in a specific device is required, the APIs
corresponding to this new peripheral/module are added in stm32f2xx_hal_newppp.c.
However the inclusion of this file is selected in the stm32lxx_hal_conf.h using the macro:
#define HAL_NEWPPP_MODULE_ENABLED
Figure 3: Adding new peripherals
Example: stm32f2xx_hal_dcmi.c/h