Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 18 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /** |
1 | /** |
2 | ****************************************************************************** |
2 | ****************************************************************************** |
3 | * @file stm32f1xx_hal.h |
3 | * @file stm32f1xx_hal.h |
4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
5 | * @brief This file contains all the functions prototypes for the HAL |
5 | * @brief This file contains all the functions prototypes for the HAL |
6 | * module driver. |
6 | * module driver. |
7 | ****************************************************************************** |
7 | ****************************************************************************** |
8 | * @attention |
8 | * @attention |
9 | * |
9 | * |
10 | * <h2><center>© Copyright (c) 2017 STMicroelectronics. |
10 | * Copyright (c) 2017 STMicroelectronics. |
11 | * All rights reserved.</center></h2> |
11 | * All rights reserved. |
12 | * |
12 | * |
13 | * This software component is licensed by ST under BSD 3-Clause license, |
13 | * This software is licensed under terms that can be found in the LICENSE file |
14 | * the "License"; You may not use this file except in compliance with the |
14 | * in the root directory of this software component. |
15 | * License. You may obtain a copy of the License at: |
15 | * If no LICENSE file comes with this software, it is provided AS-IS. |
16 | * opensource.org/licenses/BSD-3-Clause |
16 | * |
17 | * |
17 | ****************************************************************************** |
18 | ****************************************************************************** |
18 | */ |
19 | */ |
19 | |
20 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ |
|
21 | /* Define to prevent recursive inclusion -------------------------------------*/ |
21 | #ifndef __STM32F1xx_HAL_H |
22 | #ifndef __STM32F1xx_HAL_H |
22 | #define __STM32F1xx_HAL_H |
23 | #define __STM32F1xx_HAL_H |
23 | |
24 | 24 | #ifdef __cplusplus |
|
25 | #ifdef __cplusplus |
25 | extern "C" { |
26 | extern "C" { |
26 | #endif |
27 | #endif |
27 | |
28 | 28 | /* Includes ------------------------------------------------------------------*/ |
|
29 | /* Includes ------------------------------------------------------------------*/ |
29 | #include "stm32f1xx_hal_conf.h" |
30 | #include "stm32f1xx_hal_conf.h" |
30 | |
31 | 31 | /** @addtogroup STM32F1xx_HAL_Driver |
|
32 | /** @addtogroup STM32F1xx_HAL_Driver |
32 | * @{ |
33 | * @{ |
33 | */ |
34 | */ |
34 | |
35 | 35 | /** @addtogroup HAL |
|
36 | /** @addtogroup HAL |
36 | * @{ |
37 | * @{ |
37 | */ |
38 | */ |
38 | |
39 | 39 | /* Exported constants --------------------------------------------------------*/ |
|
40 | /* Exported constants --------------------------------------------------------*/ |
40 | |
41 | 41 | /** @defgroup HAL_Exported_Constants HAL Exported Constants |
|
42 | /** @defgroup HAL_Exported_Constants HAL Exported Constants |
42 | * @{ |
43 | * @{ |
43 | */ |
44 | */ |
44 | |
45 | 45 | /** @defgroup HAL_TICK_FREQ Tick Frequency |
|
46 | /** @defgroup HAL_TICK_FREQ Tick Frequency |
46 | * @{ |
47 | * @{ |
47 | */ |
48 | */ |
48 | typedef enum |
49 | typedef enum |
49 | { |
50 | { |
50 | HAL_TICK_FREQ_10HZ = 100U, |
51 | HAL_TICK_FREQ_10HZ = 100U, |
51 | HAL_TICK_FREQ_100HZ = 10U, |
52 | HAL_TICK_FREQ_100HZ = 10U, |
52 | HAL_TICK_FREQ_1KHZ = 1U, |
53 | HAL_TICK_FREQ_1KHZ = 1U, |
53 | HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ |
54 | HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ |
54 | } HAL_TickFreqTypeDef; |
55 | } HAL_TickFreqTypeDef; |
55 | /** |
56 | /** |
56 | * @} |
57 | * @} |
57 | */ |
58 | */ |
58 | /* Exported types ------------------------------------------------------------*/ |
59 | /* Exported types ------------------------------------------------------------*/ |
59 | extern __IO uint32_t uwTick; |
60 | extern __IO uint32_t uwTick; |
60 | extern uint32_t uwTickPrio; |
61 | extern uint32_t uwTickPrio; |
61 | extern HAL_TickFreqTypeDef uwTickFreq; |
62 | extern HAL_TickFreqTypeDef uwTickFreq; |
62 | |
63 | 63 | /** |
|
64 | /** |
64 | * @} |
65 | * @} |
65 | */ |
66 | */ |
66 | /* Exported macro ------------------------------------------------------------*/ |
67 | /* Exported macro ------------------------------------------------------------*/ |
67 | /** @defgroup HAL_Exported_Macros HAL Exported Macros |
68 | /** @defgroup HAL_Exported_Macros HAL Exported Macros |
68 | * @{ |
69 | * @{ |
69 | */ |
70 | */ |
70 | |
71 | 71 | /** @defgroup DBGMCU_Freeze_Unfreeze Freeze Unfreeze Peripherals in Debug mode |
|
72 | /** @defgroup DBGMCU_Freeze_Unfreeze Freeze Unfreeze Peripherals in Debug mode |
72 | * @brief Freeze/Unfreeze Peripherals in Debug mode |
73 | * @brief Freeze/Unfreeze Peripherals in Debug mode |
73 | * Note: On devices STM32F10xx8 and STM32F10xxB, |
74 | * Note: On devices STM32F10xx8 and STM32F10xxB, |
74 | * STM32F101xC/D/E and STM32F103xC/D/E, |
75 | * STM32F101xC/D/E and STM32F103xC/D/E, |
75 | * STM32F101xF/G and STM32F103xF/G |
76 | * STM32F101xF/G and STM32F103xF/G |
76 | * STM32F10xx4 and STM32F10xx6 |
77 | * STM32F10xx4 and STM32F10xx6 |
77 | * Debug registers DBGMCU_IDCODE and DBGMCU_CR are accessible only in |
78 | * Debug registers DBGMCU_IDCODE and DBGMCU_CR are accessible only in |
78 | * debug mode (not accessible by the user software in normal mode). |
79 | * debug mode (not accessible by the user software in normal mode). |
79 | * Refer to errata sheet of these devices for more details. |
80 | * Refer to errata sheet of these devices for more details. |
80 | * @{ |
81 | * @{ |
81 | */ |
82 | */ |
82 | |
83 | 83 | /* Peripherals on APB1 */ |
|
84 | /* Peripherals on APB1 */ |
84 | /** |
85 | /** |
85 | * @brief TIM2 Peripherals Debug mode |
86 | * @brief TIM2 Peripherals Debug mode |
86 | */ |
87 | */ |
87 | #define __HAL_DBGMCU_FREEZE_TIM2() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM2_STOP) |
88 | #define __HAL_DBGMCU_FREEZE_TIM2() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM2_STOP) |
88 | #define __HAL_DBGMCU_UNFREEZE_TIM2() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM2_STOP) |
89 | #define __HAL_DBGMCU_UNFREEZE_TIM2() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM2_STOP) |
89 | |
90 | 90 | /** |
|
91 | /** |
91 | * @brief TIM3 Peripherals Debug mode |
92 | * @brief TIM3 Peripherals Debug mode |
92 | */ |
93 | */ |
93 | #define __HAL_DBGMCU_FREEZE_TIM3() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM3_STOP) |
94 | #define __HAL_DBGMCU_FREEZE_TIM3() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM3_STOP) |
94 | #define __HAL_DBGMCU_UNFREEZE_TIM3() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM3_STOP) |
95 | #define __HAL_DBGMCU_UNFREEZE_TIM3() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM3_STOP) |
95 | |
96 | 96 | #if defined (DBGMCU_CR_DBG_TIM4_STOP) |
|
97 | #if defined (DBGMCU_CR_DBG_TIM4_STOP) |
97 | /** |
98 | /** |
98 | * @brief TIM4 Peripherals Debug mode |
99 | * @brief TIM4 Peripherals Debug mode |
99 | */ |
100 | */ |
100 | #define __HAL_DBGMCU_FREEZE_TIM4() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM4_STOP) |
101 | #define __HAL_DBGMCU_FREEZE_TIM4() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM4_STOP) |
101 | #define __HAL_DBGMCU_UNFREEZE_TIM4() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM4_STOP) |
102 | #define __HAL_DBGMCU_UNFREEZE_TIM4() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM4_STOP) |
102 | #endif |
103 | #endif |
103 | |
104 | 104 | #if defined (DBGMCU_CR_DBG_TIM5_STOP) |
|
105 | #if defined (DBGMCU_CR_DBG_TIM5_STOP) |
105 | /** |
106 | /** |
106 | * @brief TIM5 Peripherals Debug mode |
107 | * @brief TIM5 Peripherals Debug mode |
107 | */ |
108 | */ |
108 | #define __HAL_DBGMCU_FREEZE_TIM5() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM5_STOP) |
109 | #define __HAL_DBGMCU_FREEZE_TIM5() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM5_STOP) |
109 | #define __HAL_DBGMCU_UNFREEZE_TIM5() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM5_STOP) |
110 | #define __HAL_DBGMCU_UNFREEZE_TIM5() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM5_STOP) |
110 | #endif |
111 | #endif |
111 | |
112 | 112 | #if defined (DBGMCU_CR_DBG_TIM6_STOP) |
|
113 | #if defined (DBGMCU_CR_DBG_TIM6_STOP) |
113 | /** |
114 | /** |
114 | * @brief TIM6 Peripherals Debug mode |
115 | * @brief TIM6 Peripherals Debug mode |
115 | */ |
116 | */ |
116 | #define __HAL_DBGMCU_FREEZE_TIM6() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM6_STOP) |
117 | #define __HAL_DBGMCU_FREEZE_TIM6() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM6_STOP) |
117 | #define __HAL_DBGMCU_UNFREEZE_TIM6() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM6_STOP) |
118 | #define __HAL_DBGMCU_UNFREEZE_TIM6() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM6_STOP) |
118 | #endif |
119 | #endif |
119 | |
120 | 120 | #if defined (DBGMCU_CR_DBG_TIM7_STOP) |
|
121 | #if defined (DBGMCU_CR_DBG_TIM7_STOP) |
121 | /** |
122 | /** |
122 | * @brief TIM7 Peripherals Debug mode |
123 | * @brief TIM7 Peripherals Debug mode |
123 | */ |
124 | */ |
124 | #define __HAL_DBGMCU_FREEZE_TIM7() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM7_STOP) |
125 | #define __HAL_DBGMCU_FREEZE_TIM7() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM7_STOP) |
125 | #define __HAL_DBGMCU_UNFREEZE_TIM7() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM7_STOP) |
126 | #define __HAL_DBGMCU_UNFREEZE_TIM7() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM7_STOP) |
126 | #endif |
127 | #endif |
127 | |
128 | 128 | #if defined (DBGMCU_CR_DBG_TIM12_STOP) |
|
129 | #if defined (DBGMCU_CR_DBG_TIM12_STOP) |
129 | /** |
130 | /** |
130 | * @brief TIM12 Peripherals Debug mode |
131 | * @brief TIM12 Peripherals Debug mode |
131 | */ |
132 | */ |
132 | #define __HAL_DBGMCU_FREEZE_TIM12() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM12_STOP) |
133 | #define __HAL_DBGMCU_FREEZE_TIM12() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM12_STOP) |
133 | #define __HAL_DBGMCU_UNFREEZE_TIM12() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM12_STOP) |
134 | #define __HAL_DBGMCU_UNFREEZE_TIM12() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM12_STOP) |
134 | #endif |
135 | #endif |
135 | |
136 | 136 | #if defined (DBGMCU_CR_DBG_TIM13_STOP) |
|
137 | #if defined (DBGMCU_CR_DBG_TIM13_STOP) |
137 | /** |
138 | /** |
138 | * @brief TIM13 Peripherals Debug mode |
139 | * @brief TIM13 Peripherals Debug mode |
139 | */ |
140 | */ |
140 | #define __HAL_DBGMCU_FREEZE_TIM13() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM13_STOP) |
141 | #define __HAL_DBGMCU_FREEZE_TIM13() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM13_STOP) |
141 | #define __HAL_DBGMCU_UNFREEZE_TIM13() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM13_STOP) |
142 | #define __HAL_DBGMCU_UNFREEZE_TIM13() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM13_STOP) |
142 | #endif |
143 | #endif |
143 | |
144 | 144 | #if defined (DBGMCU_CR_DBG_TIM14_STOP) |
|
145 | #if defined (DBGMCU_CR_DBG_TIM14_STOP) |
145 | /** |
146 | /** |
146 | * @brief TIM14 Peripherals Debug mode |
147 | * @brief TIM14 Peripherals Debug mode |
147 | */ |
148 | */ |
148 | #define __HAL_DBGMCU_FREEZE_TIM14() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM14_STOP) |
149 | #define __HAL_DBGMCU_FREEZE_TIM14() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM14_STOP) |
149 | #define __HAL_DBGMCU_UNFREEZE_TIM14() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM14_STOP) |
150 | #define __HAL_DBGMCU_UNFREEZE_TIM14() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM14_STOP) |
150 | #endif |
151 | #endif |
151 | |
152 | 152 | /** |
|
153 | /** |
153 | * @brief WWDG Peripherals Debug mode |
154 | * @brief WWDG Peripherals Debug mode |
154 | */ |
155 | */ |
155 | #define __HAL_DBGMCU_FREEZE_WWDG() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_WWDG_STOP) |
156 | #define __HAL_DBGMCU_FREEZE_WWDG() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_WWDG_STOP) |
156 | #define __HAL_DBGMCU_UNFREEZE_WWDG() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_WWDG_STOP) |
157 | #define __HAL_DBGMCU_UNFREEZE_WWDG() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_WWDG_STOP) |
157 | |
158 | 158 | /** |
|
159 | /** |
159 | * @brief IWDG Peripherals Debug mode |
160 | * @brief IWDG Peripherals Debug mode |
160 | */ |
161 | */ |
161 | #define __HAL_DBGMCU_FREEZE_IWDG() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_IWDG_STOP) |
162 | #define __HAL_DBGMCU_FREEZE_IWDG() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_IWDG_STOP) |
162 | #define __HAL_DBGMCU_UNFREEZE_IWDG() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_IWDG_STOP) |
163 | #define __HAL_DBGMCU_UNFREEZE_IWDG() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_IWDG_STOP) |
163 | |
164 | 164 | /** |
|
165 | /** |
165 | * @brief I2C1 Peripherals Debug mode |
166 | * @brief I2C1 Peripherals Debug mode |
166 | */ |
167 | */ |
167 | #define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C1_SMBUS_TIMEOUT) |
168 | #define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C1_SMBUS_TIMEOUT) |
168 | #define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C1_SMBUS_TIMEOUT) |
169 | #define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C1_SMBUS_TIMEOUT) |
169 | |
170 | 170 | #if defined (DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT) |
|
171 | #if defined (DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT) |
171 | /** |
172 | /** |
172 | * @brief I2C2 Peripherals Debug mode |
173 | * @brief I2C2 Peripherals Debug mode |
173 | */ |
174 | */ |
174 | #define __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT) |
175 | #define __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT) |
175 | #define __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT) |
176 | #define __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT) |
176 | #endif |
177 | #endif |
177 | |
178 | 178 | #if defined (DBGMCU_CR_DBG_CAN1_STOP) |
|
179 | #if defined (DBGMCU_CR_DBG_CAN1_STOP) |
179 | /** |
180 | /** |
180 | * @brief CAN1 Peripherals Debug mode |
181 | * @brief CAN1 Peripherals Debug mode |
181 | */ |
182 | */ |
182 | #define __HAL_DBGMCU_FREEZE_CAN1() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN1_STOP) |
183 | #define __HAL_DBGMCU_FREEZE_CAN1() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN1_STOP) |
183 | #define __HAL_DBGMCU_UNFREEZE_CAN1() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN1_STOP) |
184 | #define __HAL_DBGMCU_UNFREEZE_CAN1() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN1_STOP) |
184 | #endif |
185 | #endif |
185 | |
186 | 186 | #if defined (DBGMCU_CR_DBG_CAN2_STOP) |
|
187 | #if defined (DBGMCU_CR_DBG_CAN2_STOP) |
187 | /** |
188 | /** |
188 | * @brief CAN2 Peripherals Debug mode |
189 | * @brief CAN2 Peripherals Debug mode |
189 | */ |
190 | */ |
190 | #define __HAL_DBGMCU_FREEZE_CAN2() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN2_STOP) |
191 | #define __HAL_DBGMCU_FREEZE_CAN2() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN2_STOP) |
191 | #define __HAL_DBGMCU_UNFREEZE_CAN2() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN2_STOP) |
192 | #define __HAL_DBGMCU_UNFREEZE_CAN2() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_CAN2_STOP) |
192 | #endif |
193 | #endif |
193 | |
194 | 194 | /* Peripherals on APB2 */ |
|
195 | /* Peripherals on APB2 */ |
195 | #if defined (DBGMCU_CR_DBG_TIM1_STOP) |
196 | #if defined (DBGMCU_CR_DBG_TIM1_STOP) |
196 | /** |
197 | /** |
197 | * @brief TIM1 Peripherals Debug mode |
198 | * @brief TIM1 Peripherals Debug mode |
198 | */ |
199 | */ |
199 | #define __HAL_DBGMCU_FREEZE_TIM1() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM1_STOP) |
200 | #define __HAL_DBGMCU_FREEZE_TIM1() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM1_STOP) |
200 | #define __HAL_DBGMCU_UNFREEZE_TIM1() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM1_STOP) |
201 | #define __HAL_DBGMCU_UNFREEZE_TIM1() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM1_STOP) |
201 | #endif |
202 | #endif |
202 | |
203 | 203 | #if defined (DBGMCU_CR_DBG_TIM8_STOP) |
|
204 | #if defined (DBGMCU_CR_DBG_TIM8_STOP) |
204 | /** |
205 | /** |
205 | * @brief TIM8 Peripherals Debug mode |
206 | * @brief TIM8 Peripherals Debug mode |
206 | */ |
207 | */ |
207 | #define __HAL_DBGMCU_FREEZE_TIM8() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM8_STOP) |
208 | #define __HAL_DBGMCU_FREEZE_TIM8() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM8_STOP) |
208 | #define __HAL_DBGMCU_UNFREEZE_TIM8() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM8_STOP) |
209 | #define __HAL_DBGMCU_UNFREEZE_TIM8() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM8_STOP) |
209 | #endif |
210 | #endif |
210 | |
211 | 211 | #if defined (DBGMCU_CR_DBG_TIM9_STOP) |
|
212 | #if defined (DBGMCU_CR_DBG_TIM9_STOP) |
212 | /** |
213 | /** |
213 | * @brief TIM9 Peripherals Debug mode |
214 | * @brief TIM9 Peripherals Debug mode |
214 | */ |
215 | */ |
215 | #define __HAL_DBGMCU_FREEZE_TIM9() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM9_STOP) |
216 | #define __HAL_DBGMCU_FREEZE_TIM9() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM9_STOP) |
216 | #define __HAL_DBGMCU_UNFREEZE_TIM9() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM9_STOP) |
217 | #define __HAL_DBGMCU_UNFREEZE_TIM9() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM9_STOP) |
217 | #endif |
218 | #endif |
218 | |
219 | 219 | #if defined (DBGMCU_CR_DBG_TIM10_STOP) |
|
220 | #if defined (DBGMCU_CR_DBG_TIM10_STOP) |
220 | /** |
221 | /** |
221 | * @brief TIM10 Peripherals Debug mode |
222 | * @brief TIM10 Peripherals Debug mode |
222 | */ |
223 | */ |
223 | #define __HAL_DBGMCU_FREEZE_TIM10() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM10_STOP) |
224 | #define __HAL_DBGMCU_FREEZE_TIM10() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM10_STOP) |
224 | #define __HAL_DBGMCU_UNFREEZE_TIM10() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM10_STOP) |
225 | #define __HAL_DBGMCU_UNFREEZE_TIM10() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM10_STOP) |
225 | #endif |
226 | #endif |
226 | |
227 | 227 | #if defined (DBGMCU_CR_DBG_TIM11_STOP) |
|
228 | #if defined (DBGMCU_CR_DBG_TIM11_STOP) |
228 | /** |
229 | /** |
229 | * @brief TIM11 Peripherals Debug mode |
230 | * @brief TIM11 Peripherals Debug mode |
230 | */ |
231 | */ |
231 | #define __HAL_DBGMCU_FREEZE_TIM11() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM11_STOP) |
232 | #define __HAL_DBGMCU_FREEZE_TIM11() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM11_STOP) |
232 | #define __HAL_DBGMCU_UNFREEZE_TIM11() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM11_STOP) |
233 | #define __HAL_DBGMCU_UNFREEZE_TIM11() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM11_STOP) |
233 | #endif |
234 | #endif |
234 | |
235 | 235 | ||
236 | 236 | #if defined (DBGMCU_CR_DBG_TIM15_STOP) |
|
237 | #if defined (DBGMCU_CR_DBG_TIM15_STOP) |
237 | /** |
238 | /** |
238 | * @brief TIM15 Peripherals Debug mode |
239 | * @brief TIM15 Peripherals Debug mode |
239 | */ |
240 | */ |
240 | #define __HAL_DBGMCU_FREEZE_TIM15() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM15_STOP) |
241 | #define __HAL_DBGMCU_FREEZE_TIM15() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM15_STOP) |
241 | #define __HAL_DBGMCU_UNFREEZE_TIM15() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM15_STOP) |
242 | #define __HAL_DBGMCU_UNFREEZE_TIM15() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM15_STOP) |
242 | #endif |
243 | #endif |
243 | |
244 | 244 | #if defined (DBGMCU_CR_DBG_TIM16_STOP) |
|
245 | #if defined (DBGMCU_CR_DBG_TIM16_STOP) |
245 | /** |
246 | /** |
246 | * @brief TIM16 Peripherals Debug mode |
247 | * @brief TIM16 Peripherals Debug mode |
247 | */ |
248 | */ |
248 | #define __HAL_DBGMCU_FREEZE_TIM16() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM16_STOP) |
249 | #define __HAL_DBGMCU_FREEZE_TIM16() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM16_STOP) |
249 | #define __HAL_DBGMCU_UNFREEZE_TIM16() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM16_STOP) |
250 | #define __HAL_DBGMCU_UNFREEZE_TIM16() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM16_STOP) |
250 | #endif |
251 | #endif |
251 | |
252 | 252 | #if defined (DBGMCU_CR_DBG_TIM17_STOP) |
|
253 | #if defined (DBGMCU_CR_DBG_TIM17_STOP) |
253 | /** |
254 | /** |
254 | * @brief TIM17 Peripherals Debug mode |
255 | * @brief TIM17 Peripherals Debug mode |
255 | */ |
256 | */ |
256 | #define __HAL_DBGMCU_FREEZE_TIM17() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM17_STOP) |
257 | #define __HAL_DBGMCU_FREEZE_TIM17() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM17_STOP) |
257 | #define __HAL_DBGMCU_UNFREEZE_TIM17() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM17_STOP) |
258 | #define __HAL_DBGMCU_UNFREEZE_TIM17() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_TIM17_STOP) |
258 | #endif |
259 | #endif |
259 | |
260 | 260 | /** |
|
261 | /** |
261 | * @} |
262 | * @} |
262 | */ |
263 | */ |
263 | |
264 | 264 | /** @defgroup HAL_Private_Macros HAL Private Macros |
|
265 | /** @defgroup HAL_Private_Macros HAL Private Macros |
265 | * @{ |
266 | * @{ |
266 | */ |
267 | */ |
267 | #define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \ |
268 | #define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \ |
268 | ((FREQ) == HAL_TICK_FREQ_100HZ) || \ |
269 | ((FREQ) == HAL_TICK_FREQ_100HZ) || \ |
269 | ((FREQ) == HAL_TICK_FREQ_1KHZ)) |
270 | ((FREQ) == HAL_TICK_FREQ_1KHZ)) |
270 | /** |
271 | /** |
271 | * @} |
272 | * @} |
272 | */ |
273 | */ |
273 | |
274 | 274 | /* Exported functions --------------------------------------------------------*/ |
|
275 | /* Exported functions --------------------------------------------------------*/ |
275 | /** @addtogroup HAL_Exported_Functions |
276 | /** @addtogroup HAL_Exported_Functions |
276 | * @{ |
277 | * @{ |
277 | */ |
278 | */ |
278 | /** @addtogroup HAL_Exported_Functions_Group1 |
279 | /** @addtogroup HAL_Exported_Functions_Group1 |
279 | * @{ |
280 | * @{ |
280 | */ |
281 | */ |
281 | /* Initialization and de-initialization functions ******************************/ |
282 | /* Initialization and de-initialization functions ******************************/ |
282 | HAL_StatusTypeDef HAL_Init(void); |
283 | HAL_StatusTypeDef HAL_Init(void); |
283 | HAL_StatusTypeDef HAL_DeInit(void); |
284 | HAL_StatusTypeDef HAL_DeInit(void); |
284 | void HAL_MspInit(void); |
285 | void HAL_MspInit(void); |
285 | void HAL_MspDeInit(void); |
286 | void HAL_MspDeInit(void); |
286 | HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority); |
287 | HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority); |
287 | /** |
288 | /** |
288 | * @} |
289 | * @} |
289 | */ |
290 | */ |
290 | |
291 | 291 | /** @addtogroup HAL_Exported_Functions_Group2 |
|
292 | /** @addtogroup HAL_Exported_Functions_Group2 |
292 | * @{ |
293 | * @{ |
293 | */ |
294 | */ |
294 | /* Peripheral Control functions ************************************************/ |
295 | /* Peripheral Control functions ************************************************/ |
295 | void HAL_IncTick(void); |
296 | void HAL_IncTick(void); |
296 | void HAL_Delay(uint32_t Delay); |
297 | void HAL_Delay(uint32_t Delay); |
297 | uint32_t HAL_GetTick(void); |
298 | uint32_t HAL_GetTick(void); |
298 | uint32_t HAL_GetTickPrio(void); |
299 | uint32_t HAL_GetTickPrio(void); |
299 | HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq); |
300 | HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq); |
300 | HAL_TickFreqTypeDef HAL_GetTickFreq(void); |
301 | HAL_TickFreqTypeDef HAL_GetTickFreq(void); |
301 | void HAL_SuspendTick(void); |
302 | void HAL_SuspendTick(void); |
302 | void HAL_ResumeTick(void); |
303 | void HAL_ResumeTick(void); |
303 | uint32_t HAL_GetHalVersion(void); |
304 | uint32_t HAL_GetHalVersion(void); |
304 | uint32_t HAL_GetREVID(void); |
305 | uint32_t HAL_GetREVID(void); |
305 | uint32_t HAL_GetDEVID(void); |
306 | uint32_t HAL_GetDEVID(void); |
306 | uint32_t HAL_GetUIDw0(void); |
307 | uint32_t HAL_GetUIDw0(void); |
307 | uint32_t HAL_GetUIDw1(void); |
308 | uint32_t HAL_GetUIDw1(void); |
308 | uint32_t HAL_GetUIDw2(void); |
309 | uint32_t HAL_GetUIDw2(void); |
309 | void HAL_DBGMCU_EnableDBGSleepMode(void); |
310 | void HAL_DBGMCU_EnableDBGSleepMode(void); |
310 | void HAL_DBGMCU_DisableDBGSleepMode(void); |
311 | void HAL_DBGMCU_DisableDBGSleepMode(void); |
311 | void HAL_DBGMCU_EnableDBGStopMode(void); |
312 | void HAL_DBGMCU_EnableDBGStopMode(void); |
312 | void HAL_DBGMCU_DisableDBGStopMode(void); |
313 | void HAL_DBGMCU_DisableDBGStopMode(void); |
313 | void HAL_DBGMCU_EnableDBGStandbyMode(void); |
314 | void HAL_DBGMCU_EnableDBGStandbyMode(void); |
314 | void HAL_DBGMCU_DisableDBGStandbyMode(void); |
315 | void HAL_DBGMCU_DisableDBGStandbyMode(void); |
315 | /** |
316 | /** |
316 | * @} |
317 | * @} |
317 | */ |
318 | */ |
318 | |
319 | 319 | /** |
|
320 | /** |
320 | * @} |
321 | * @} |
321 | */ |
322 | */ |
322 | |
323 | 323 | /** |
|
324 | /** |
324 | * @} |
325 | * @} |
325 | */ |
326 | */ |
326 | /* Private types -------------------------------------------------------------*/ |
327 | /* Private types -------------------------------------------------------------*/ |
327 | /* Private variables ---------------------------------------------------------*/ |
328 | /* Private variables ---------------------------------------------------------*/ |
328 | /** @defgroup HAL_Private_Variables HAL Private Variables |
329 | /** @defgroup HAL_Private_Variables HAL Private Variables |
329 | * @{ |
330 | * @{ |
330 | */ |
331 | */ |
331 | /** |
332 | /** |
332 | * @} |
333 | * @} |
333 | */ |
334 | */ |
334 | /* Private constants ---------------------------------------------------------*/ |
335 | /* Private constants ---------------------------------------------------------*/ |
335 | /** @defgroup HAL_Private_Constants HAL Private Constants |
336 | /** @defgroup HAL_Private_Constants HAL Private Constants |
336 | * @{ |
337 | * @{ |
337 | */ |
338 | */ |
338 | /** |
339 | /** |
339 | * @} |
340 | * @} |
340 | */ |
341 | */ |
341 | /* Private macros ------------------------------------------------------------*/ |
342 | /* Private macros ------------------------------------------------------------*/ |
342 | /* Private functions ---------------------------------------------------------*/ |
343 | /* Private functions ---------------------------------------------------------*/ |
343 | /** |
344 | /** |
344 | * @} |
345 | * @} |
345 | */ |
346 | */ |
346 | |
347 | 347 | /** |
|
348 | /** |
348 | * @} |
349 | * @} |
349 | */ |
350 | */ |
350 | |
351 | 351 | #ifdef __cplusplus |
|
352 | #ifdef __cplusplus |
352 | } |
353 | } |
353 | #endif |
354 | #endif |
354 | |
355 | 355 | #endif /* __STM32F1xx_HAL_H */ |
|
356 | #endif /* __STM32F1xx_HAL_H */ |
356 | |
357 | 357 | ||
358 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
- |