11/**
2- ******************************************************************************
2+ **********************************************************************************************************************
33 * @file stm32c5xx_hal_adc.h
44 * @brief Header file of ADC HAL module.
5- ******************************************************************************
5+ **********************************************************************************************************************
66 * @attention
77 *
88 * Copyright (c) 2026 STMicroelectronics.
1212 * in the root directory of this software component.
1313 * If no LICENSE file comes with this software, it is provided AS-IS.
1414 *
15- ******************************************************************************
15+ *
16+ **********************************************************************************************************************
1617 */
1718
18- /* Define to prevent recursive inclusion -------------------------------------*/
19+ /* Define to prevent recursive inclusion ----------------------------------------------------------------------------- */
1920#ifndef STM32C5XX_HAL_ADC_H
2021#define STM32C5XX_HAL_ADC_H
2122
2223#ifdef __cplusplus
2324extern "C" {
2425#endif /* __cplusplus */
2526
26- /* Includes ------------------------------------------------------------------*/
27+ /* Includes ---------------------------------------------------------------------------------------------------------- */
2728#include "stm32c5xx_hal_def.h"
2829#include "stm32c5xx_ll_adc.h"
2930
@@ -37,7 +38,7 @@ extern "C" {
3738 * @{
3839 */
3940
40- /* Private constants ---------------------------------------------------------*/
41+ /* Private constants ------------------------------------------------------------------------------------------------- */
4142/** @addtogroup ADC_Private_Constants
4243 * @{
4344 */
@@ -52,8 +53,8 @@ extern "C" {
5253 * @}
5354 */
5455
55- /* Exported constants ---------------------------------------------------------*/
56- /** @defgroup ADC_Exported_Constants HAL ADC Constants
56+ /* Exported constants ------------------------------------------------------------------------------------------------ */
57+ /** @defgroup ADC_Exported_Constants HAL ADC Exported Constants
5758 * @{
5859 */
5960
@@ -126,11 +127,12 @@ extern "C" {
126127 * @}
127128 */
128129
130+
129131/**
130132 * @}
131133 */
132134
133- /* Exported macro -------------------------------------------------------------*/
135+ /* Exported macro ---------------------------------------------------------------------------------------------------- */
134136/** @defgroup ADC_Exported_Macro ADC Exported Macro
135137 * @{
136138 */
@@ -285,8 +287,8 @@ LL_ADC_CONVERT_DATA_RESOLUTION((data), \
285287 * @}
286288 */
287289
288- /* Exported types ------------------------------------------------------------*/
289- /** @defgroup ADC_Exported_Types HAL ADC Types
290+ /* Exported types ---------------------------------------------------------------------------------------------------- */
291+ /** @defgroup ADC_Exported_Types ADC Exported Types
290292 * @{
291293 */
292294
@@ -496,11 +498,13 @@ typedef enum
496498 HAL_ADC_REG_TRIG_TIM8_TRGO = LL_ADC_REG_TRIG_TIM8_TRGO , /*!< ADC group regular conversion
497499 trigger from periph: TIM8 TRGO */
498500 HAL_ADC_REG_TRIG_TIM8_TRGO2 = LL_ADC_REG_TRIG_TIM8_TRGO2 , /*!< ADC group regular conversion
499- trigger from periph: TIM5 TRGO */
501+ trigger from periph: TIM8 TRGO2 */
500502 HAL_ADC_REG_TRIG_TIM15_TRGO = LL_ADC_REG_TRIG_TIM15_TRGO , /*!< ADC group regular conversion
501503 trigger from periph: TIM15 TRGO */
504+ #if defined(LPTIM1 )
502505 HAL_ADC_REG_TRIG_LPTIM1_OC1 = LL_ADC_REG_TRIG_LPTIM1_OC1 , /*!< ADC group regular conversion
503506 trigger from periph: LPTIM1 channel 1. */
507+ #endif /* LPTIM1 */
504508} hal_adc_reg_trig_src_t ;
505509
506510/**
@@ -621,8 +625,10 @@ typedef enum
621625 trigger from external peripheral: TIM12 TRGO */
622626 HAL_ADC_INJ_TRIG_TIM15_TRGO = LL_ADC_INJ_TRIG_TIM15_TRGO , /*!< ADC group injected conversion
623627 trigger from external peripheral: TIM15 TRGO */
628+ #if defined(LPTIM1 )
624629 HAL_ADC_INJ_TRIG_LPTIM1_OC1 = LL_ADC_INJ_TRIG_LPTIM1_OC1 , /*!< ADC group injected conversion
625630 trigger from external peripheral: LPTIM1 channel 1 */
631+ #endif /* LPTIM1 */
626632 HAL_ADC_INJ_TRIG_FROM_REGULAR = LL_ADC_INJ_TRIG_FROM_REGULAR /*!< ADC group injected conversion
627633 trigger from ADC group regular end of sequence (no action ADC group injected
628634 conversion start or stop).
@@ -1040,15 +1046,17 @@ typedef struct
10401046 */
10411047typedef struct
10421048{
1043- hal_adc_left_bit_shift_t left_bit_shift ; /*!< ADC data post-processing: left bit shift */
1049+ hal_adc_left_bit_shift_t left_bit_shift ; /*!< ADC data post-processing: left bit shift
1050+ for ADC groups regular and injected conversions. */
10441051 uint32_t gain_compensation_x1000 ; /*!< ADC data post-processing: ADC gain coefficient
10451052 applied to raw conversions data. Value multiplied by 1000 to have an integer
10461053 value (example: to set coefficient 0.982, parameter value must be 982).
10471054 Therefore, unitary gain corresponds to value 1000.
10481055 Can be a number between: Min_Data = 0, Max_Data = 3999.
10491056 Note: Coefficient resolution managed by ADC peripheral is higher than 1/1000,
10501057 if needed to reach more accurate resolution, refer to function
1051- LL_ADC_SetGainCompensation() */
1058+ LL_ADC_SetGainCompensation().
1059+ Note: Applies to ADC groups regular and injected conversions. */
10521060} hal_adc_post_processing_config_t ;
10531061
10541062/**
@@ -1274,8 +1282,8 @@ struct hal_adc_handle_s
12741282 * @}
12751283 */
12761284
1277- /* Exported functions ---------------------------------------------------------*/
1278- /** @defgroup ADC_Exported_Functions HAL ADC Functions
1285+ /* Exported functions ------------------------------------------------------------------------------------------------ */
1286+ /** @defgroup ADC_Exported_Functions ADC Exported Functions
12791287 * @{
12801288 */
12811289
@@ -1398,7 +1406,7 @@ hal_status_t HAL_ADC_RegisterAwdOutOfWindowCallback(hal_adc_handle_t *hadc, hal_
13981406 * @}
13991407 */
14001408
1401- /** @defgroup ADC_Exported_Functions_Group4 Peripheral State, Error functions
1409+ /** @defgroup ADC_Exported_Functions_Group4 Peripheral state, errors, kernel clock frequency functions
14021410 * @{
14031411 */
14041412hal_adc_state_t HAL_ADC_GetState (const hal_adc_handle_t * hadc );
0 commit comments