Skip to content

Commit 608b0aa

Browse files
committed
system(C0) add STM32C0xx HAL Drivers to v1.0.1
Included in STM32CubeC0 FW 1.0.1 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent deefe8b commit 608b0aa

File tree

125 files changed

+128968
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+128968
-0
lines changed

system/Drivers/STM32C0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

Lines changed: 3982 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32_assert.h
4+
* @author MCD Application Team
5+
* @brief STM32 assert template file.
6+
* This file should be copied to the application folder and renamed
7+
* to stm32_assert.h.
8+
******************************************************************************
9+
* @attention
10+
*
11+
* Copyright (c) 2022 STMicroelectronics.
12+
* All rights reserved.
13+
*
14+
* This software is licensed under terms that can be found in the LICENSE file
15+
* in the root directory of this software component.
16+
* If no LICENSE file comes with this software, it is provided AS-IS.
17+
*
18+
******************************************************************************
19+
*/
20+
21+
/* Define to prevent recursive inclusion -------------------------------------*/
22+
#ifndef STM32_ASSERT_H
23+
#define STM32_ASSERT_H
24+
25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
28+
29+
/* Exported types ------------------------------------------------------------*/
30+
/* Exported constants --------------------------------------------------------*/
31+
/* Includes ------------------------------------------------------------------*/
32+
/* Exported macro ------------------------------------------------------------*/
33+
#ifdef USE_FULL_ASSERT
34+
/**
35+
* @brief The assert_param macro is used for functions parameters check.
36+
* @param expr: If expr is false, it calls assert_failed function
37+
* which reports the name of the source file and the source
38+
* line number of the call that failed.
39+
* If expr is true, it returns no value.
40+
* @retval None
41+
*/
42+
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
43+
/* Exported functions ------------------------------------------------------- */
44+
void assert_failed(uint8_t *file, uint32_t line);
45+
#else
46+
#define assert_param(expr) ((void)0U)
47+
#endif /* USE_FULL_ASSERT */
48+
49+
#ifdef __cplusplus
50+
}
51+
#endif
52+
53+
#endif /* STM32_ASSERT_H */

system/Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_hal.h

Lines changed: 582 additions & 0 deletions
Large diffs are not rendered by default.

system/Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_hal_adc.h

Lines changed: 1723 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32c0xx_hal_adc_ex.h
4+
* @author MCD Application Team
5+
* @brief Header file of ADC HAL extended module.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* Copyright (c) 2022 STMicroelectronics.
10+
* All rights reserved.
11+
*
12+
* This software is licensed under terms that can be found in the LICENSE file
13+
* in the root directory of this software component.
14+
* If no LICENSE file comes with this software, it is provided AS-IS.
15+
*
16+
******************************************************************************
17+
*/
18+
19+
/* Define to prevent recursive inclusion -------------------------------------*/
20+
#ifndef STM32C0xx_HAL_ADC_EX_H
21+
#define STM32C0xx_HAL_ADC_EX_H
22+
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
/* Includes ------------------------------------------------------------------*/
28+
#include "stm32c0xx_hal_def.h"
29+
30+
/** @addtogroup STM32C0xx_HAL_Driver
31+
* @{
32+
*/
33+
34+
/** @addtogroup ADCEx
35+
* @{
36+
*/
37+
38+
/* Exported types ------------------------------------------------------------*/
39+
/** @defgroup ADCEx_Exported_Types ADC Extended Exported Types
40+
* @{
41+
*/
42+
43+
/**
44+
* @}
45+
*/
46+
47+
/* Exported constants --------------------------------------------------------*/
48+
49+
/** @defgroup ADCEx_Exported_Constants ADC Extended Exported Constants
50+
* @{
51+
*/
52+
53+
/** @defgroup ADC_HAL_EC_GROUPS ADC instance - Groups
54+
* @{
55+
*/
56+
#define ADC_REGULAR_GROUP (LL_ADC_GROUP_REGULAR) /*!< ADC group regular (available on all STM32 devices) */
57+
/**
58+
* @}
59+
*/
60+
61+
/**
62+
* @}
63+
*/
64+
65+
/* Exported macros -----------------------------------------------------------*/
66+
67+
/* Private macros ------------------------------------------------------------*/
68+
69+
/** @defgroup ADCEx_Private_Macro_internal_HAL_driver ADC Extended Private Macros
70+
* @{
71+
*/
72+
/* Macro reserved for internal HAL driver usage, not intended to be used in */
73+
/* code of final user. */
74+
75+
/**
76+
* @brief Check whether or not ADC is independent.
77+
* @param __HANDLE__ ADC handle.
78+
* @note When multimode feature is not available, the macro always returns SET.
79+
* @retval SET (ADC is independent) or RESET (ADC is not).
80+
*/
81+
#define ADC_IS_INDEPENDENT(__HANDLE__) (SET)
82+
83+
84+
/**
85+
* @brief Calibration factor size verification (7 bits maximum).
86+
* @param __CALIBRATION_FACTOR__ Calibration factor value.
87+
* @retval SET (__CALIBRATION_FACTOR__ is within the authorized size) or RESET (__CALIBRATION_FACTOR__ is too large)
88+
*/
89+
#define IS_ADC_CALFACT(__CALIBRATION_FACTOR__) ((__CALIBRATION_FACTOR__) <= (0x7FU))
90+
91+
/**
92+
* @brief Verify the ADC oversampling ratio.
93+
* @param __RATIO__ programmed ADC oversampling ratio.
94+
* @retval SET (__RATIO__ is a valid value) or RESET (__RATIO__ is invalid)
95+
*/
96+
#define IS_ADC_OVERSAMPLING_RATIO(__RATIO__) (((__RATIO__) == ADC_OVERSAMPLING_RATIO_2 ) || \
97+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_4 ) || \
98+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_8 ) || \
99+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_16 ) || \
100+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_32 ) || \
101+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_64 ) || \
102+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_128 ) || \
103+
((__RATIO__) == ADC_OVERSAMPLING_RATIO_256 ))
104+
105+
/**
106+
* @brief Verify the ADC oversampling shift.
107+
* @param __SHIFT__ programmed ADC oversampling shift.
108+
* @retval SET (__SHIFT__ is a valid value) or RESET (__SHIFT__ is invalid)
109+
*/
110+
#define IS_ADC_RIGHT_BIT_SHIFT(__SHIFT__) (((__SHIFT__) == ADC_RIGHTBITSHIFT_NONE) || \
111+
((__SHIFT__) == ADC_RIGHTBITSHIFT_1 ) || \
112+
((__SHIFT__) == ADC_RIGHTBITSHIFT_2 ) || \
113+
((__SHIFT__) == ADC_RIGHTBITSHIFT_3 ) || \
114+
((__SHIFT__) == ADC_RIGHTBITSHIFT_4 ) || \
115+
((__SHIFT__) == ADC_RIGHTBITSHIFT_5 ) || \
116+
((__SHIFT__) == ADC_RIGHTBITSHIFT_6 ) || \
117+
((__SHIFT__) == ADC_RIGHTBITSHIFT_7 ) || \
118+
((__SHIFT__) == ADC_RIGHTBITSHIFT_8 ))
119+
120+
/**
121+
* @brief Verify the ADC oversampling triggered mode.
122+
* @param __MODE__ programmed ADC oversampling triggered mode.
123+
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
124+
*/
125+
#define IS_ADC_TRIGGERED_OVERSAMPLING_MODE(__MODE__) (((__MODE__) == ADC_TRIGGEREDMODE_SINGLE_TRIGGER) || \
126+
((__MODE__) == ADC_TRIGGEREDMODE_MULTI_TRIGGER) )
127+
128+
129+
/**
130+
* @}
131+
*/
132+
133+
134+
/* Exported functions --------------------------------------------------------*/
135+
/** @addtogroup ADCEx_Exported_Functions
136+
* @{
137+
*/
138+
139+
/** @addtogroup ADCEx_Exported_Functions_Group1
140+
* @{
141+
*/
142+
/* IO operation functions *****************************************************/
143+
144+
/* ADC calibration */
145+
HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef *hadc);
146+
uint32_t HAL_ADCEx_Calibration_GetValue(ADC_HandleTypeDef *hadc);
147+
HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t CalibrationFactor);
148+
149+
/* ADC IRQHandler and Callbacks used in non-blocking modes (Interruption) */
150+
void HAL_ADCEx_LevelOutOfWindow2Callback(ADC_HandleTypeDef *hadc);
151+
void HAL_ADCEx_LevelOutOfWindow3Callback(ADC_HandleTypeDef *hadc);
152+
void HAL_ADCEx_EndOfSamplingCallback(ADC_HandleTypeDef *hadc);
153+
void HAL_ADCEx_ChannelConfigReadyCallback(ADC_HandleTypeDef *hadc);
154+
155+
/**
156+
* @}
157+
*/
158+
159+
/** @addtogroup ADCEx_Exported_Functions_Group2
160+
* @{
161+
*/
162+
/* Peripheral Control functions ***********************************************/
163+
HAL_StatusTypeDef HAL_ADCEx_DisableVoltageRegulator(ADC_HandleTypeDef *hadc);
164+
165+
/**
166+
* @}
167+
*/
168+
169+
/**
170+
* @}
171+
*/
172+
173+
/**
174+
* @}
175+
*/
176+
177+
/**
178+
* @}
179+
*/
180+
181+
#ifdef __cplusplus
182+
}
183+
#endif
184+
185+
#endif /* STM32C0xx_HAL_ADC_EX_H */

0 commit comments

Comments
 (0)