Skip to content

Commit 99de29a

Browse files
committed
Add STM32G0xx HAL Drivers v1.1.0
Included in STM32CubeG0 FW V1.1.0 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent de68692 commit 99de29a

File tree

142 files changed

+160263
-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.

142 files changed

+160263
-0
lines changed

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

+3,451
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
* <h2><center>&copy; Copyright (c) 2018 STMicroelectronics.
12+
* All rights reserved.</center></h2>
13+
*
14+
* This software component is licensed by ST under BSD 3-Clause license,
15+
* the "License"; You may not use this file except in compliance with the
16+
* License. You may obtain a copy of the License at:
17+
* opensource.org/licenses/BSD-3-Clause
18+
*
19+
******************************************************************************
20+
*/
21+
22+
/* Define to prevent recursive inclusion -------------------------------------*/
23+
#ifndef STM32_ASSERT_H
24+
#define STM32_ASSERT_H
25+
26+
#ifdef __cplusplus
27+
extern "C" {
28+
#endif
29+
30+
/* Exported types ------------------------------------------------------------*/
31+
/* Exported constants --------------------------------------------------------*/
32+
/* Includes ------------------------------------------------------------------*/
33+
/* Exported macro ------------------------------------------------------------*/
34+
#ifdef USE_FULL_ASSERT
35+
/**
36+
* @brief The assert_param macro is used for functions parameters check.
37+
* @param expr: If expr is false, it calls assert_failed function
38+
* which reports the name of the source file and the source
39+
* line number of the call that failed.
40+
* If expr is true, it returns no value.
41+
* @retval None
42+
*/
43+
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
44+
/* Exported functions ------------------------------------------------------- */
45+
void assert_failed(uint8_t *file, uint32_t line);
46+
#else
47+
#define assert_param(expr) ((void)0U)
48+
#endif /* USE_FULL_ASSERT */
49+
50+
#ifdef __cplusplus
51+
}
52+
#endif
53+
54+
#endif /* STM32_ASSERT_H */
55+
56+
57+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h

+723
Large diffs are not rendered by default.

system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h

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

0 commit comments

Comments
 (0)