Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /** |
2 | ****************************************************************************** |
||
3 | * @file stm32f1xx_hal_tim_ex.h |
||
4 | * @author MCD Application Team |
||
9 | mjames | 5 | * @brief Header file of TIM HAL Extended module. |
2 | mjames | 6 | ****************************************************************************** |
7 | * @attention |
||
8 | * |
||
9 | mjames | 9 | * <h2><center>© Copyright (c) 2016 STMicroelectronics. |
10 | * All rights reserved.</center></h2> |
||
2 | mjames | 11 | * |
9 | mjames | 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 |
||
2 | mjames | 16 | * |
17 | ****************************************************************************** |
||
9 | mjames | 18 | */ |
2 | mjames | 19 | |
20 | /* Define to prevent recursive inclusion -------------------------------------*/ |
||
9 | mjames | 21 | #ifndef STM32F1xx_HAL_TIM_EX_H |
22 | #define STM32F1xx_HAL_TIM_EX_H |
||
2 | mjames | 23 | |
24 | #ifdef __cplusplus |
||
9 | mjames | 25 | extern "C" { |
2 | mjames | 26 | #endif |
27 | |||
28 | /* Includes ------------------------------------------------------------------*/ |
||
29 | #include "stm32f1xx_hal_def.h" |
||
30 | |||
31 | /** @addtogroup STM32F1xx_HAL_Driver |
||
32 | * @{ |
||
33 | */ |
||
34 | |||
35 | /** @addtogroup TIMEx |
||
36 | * @{ |
||
9 | mjames | 37 | */ |
2 | mjames | 38 | |
9 | mjames | 39 | /* Exported types ------------------------------------------------------------*/ |
40 | /** @defgroup TIMEx_Exported_Types TIM Extended Exported Types |
||
2 | mjames | 41 | * @{ |
42 | */ |
||
43 | |||
9 | mjames | 44 | /** |
45 | * @brief TIM Hall sensor Configuration Structure definition |
||
2 | mjames | 46 | */ |
47 | |||
48 | typedef struct |
||
49 | { |
||
9 | mjames | 50 | uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal. |
51 | This parameter can be a value of @ref TIM_Input_Capture_Polarity */ |
||
2 | mjames | 52 | |
53 | uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler. |
||
54 | This parameter can be a value of @ref TIM_Input_Capture_Prescaler */ |
||
55 | |||
56 | uint32_t IC1Filter; /*!< Specifies the input capture filter. |
||
9 | mjames | 57 | This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */ |
58 | |||
59 | uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register. |
||
60 | This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */ |
||
2 | mjames | 61 | } TIM_HallSensor_InitTypeDef; |
62 | /** |
||
63 | * @} |
||
9 | mjames | 64 | */ |
65 | /* End of exported types -----------------------------------------------------*/ |
||
2 | mjames | 66 | |
67 | /* Exported constants --------------------------------------------------------*/ |
||
9 | mjames | 68 | /** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants |
2 | mjames | 69 | * @{ |
70 | */ |
||
9 | mjames | 71 | |
72 | /** @defgroup TIMEx_Remap TIM Extended Remapping |
||
2 | mjames | 73 | * @{ |
74 | */ |
||
75 | /** |
||
76 | * @} |
||
77 | */ |
||
78 | |||
79 | /** |
||
80 | * @} |
||
81 | */ |
||
9 | mjames | 82 | /* End of exported constants -------------------------------------------------*/ |
2 | mjames | 83 | |
84 | /* Exported macro ------------------------------------------------------------*/ |
||
9 | mjames | 85 | /** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros |
86 | * @{ |
||
87 | */ |
||
88 | |||
2 | mjames | 89 | /** |
9 | mjames | 90 | * @} |
2 | mjames | 91 | */ |
9 | mjames | 92 | /* End of exported macro -----------------------------------------------------*/ |
2 | mjames | 93 | |
9 | mjames | 94 | /* Private macro -------------------------------------------------------------*/ |
95 | /** @defgroup TIMEx_Private_Macros TIM Extended Private Macros |
||
96 | * @{ |
||
97 | */ |
||
98 | |||
2 | mjames | 99 | /** |
9 | mjames | 100 | * @} |
2 | mjames | 101 | */ |
9 | mjames | 102 | /* End of private macro ------------------------------------------------------*/ |
2 | mjames | 103 | |
104 | /* Exported functions --------------------------------------------------------*/ |
||
9 | mjames | 105 | /** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions |
2 | mjames | 106 | * @{ |
107 | */ |
||
108 | |||
9 | mjames | 109 | /** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions |
110 | * @brief Timer Hall Sensor functions |
||
2 | mjames | 111 | * @{ |
9 | mjames | 112 | */ |
113 | /* Timer Hall Sensor functions **********************************************/ |
||
114 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig); |
||
2 | mjames | 115 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim); |
116 | |||
117 | void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim); |
||
118 | void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim); |
||
119 | |||
9 | mjames | 120 | /* Blocking mode: Polling */ |
2 | mjames | 121 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim); |
122 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim); |
||
123 | /* Non-Blocking mode: Interrupt */ |
||
124 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim); |
||
125 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim); |
||
126 | /* Non-Blocking mode: DMA */ |
||
127 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length); |
||
128 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim); |
||
129 | /** |
||
130 | * @} |
||
131 | */ |
||
132 | |||
9 | mjames | 133 | /** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions |
134 | * @brief Timer Complementary Output Compare functions |
||
135 | * @{ |
||
136 | */ |
||
137 | /* Timer Complementary Output Compare functions *****************************/ |
||
2 | mjames | 138 | /* Blocking mode: Polling */ |
139 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
140 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
141 | |||
142 | /* Non-Blocking mode: Interrupt */ |
||
143 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
144 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
145 | |||
146 | /* Non-Blocking mode: DMA */ |
||
147 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
||
148 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
149 | /** |
||
150 | * @} |
||
151 | */ |
||
152 | |||
9 | mjames | 153 | /** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions |
154 | * @brief Timer Complementary PWM functions |
||
155 | * @{ |
||
156 | */ |
||
157 | /* Timer Complementary PWM functions ****************************************/ |
||
2 | mjames | 158 | /* Blocking mode: Polling */ |
159 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
160 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
161 | |||
162 | /* Non-Blocking mode: Interrupt */ |
||
163 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
164 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
165 | /* Non-Blocking mode: DMA */ |
||
166 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
||
167 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); |
||
168 | /** |
||
169 | * @} |
||
170 | */ |
||
171 | |||
9 | mjames | 172 | /** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions |
173 | * @brief Timer Complementary One Pulse functions |
||
174 | * @{ |
||
175 | */ |
||
176 | /* Timer Complementary One Pulse functions **********************************/ |
||
2 | mjames | 177 | /* Blocking mode: Polling */ |
178 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
||
179 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
||
180 | |||
181 | /* Non-Blocking mode: Interrupt */ |
||
182 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
||
183 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
||
184 | /** |
||
185 | * @} |
||
186 | */ |
||
187 | |||
9 | mjames | 188 | /** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions |
189 | * @brief Peripheral Control functions |
||
190 | * @{ |
||
191 | */ |
||
2 | mjames | 192 | /* Extended Control functions ************************************************/ |
9 | mjames | 193 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent(TIM_HandleTypeDef *htim, uint32_t InputTrigger, |
194 | uint32_t CommutationSource); |
||
195 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32_t InputTrigger, |
||
196 | uint32_t CommutationSource); |
||
197 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger, |
||
198 | uint32_t CommutationSource); |
||
199 | HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, |
||
200 | TIM_MasterConfigTypeDef *sMasterConfig); |
||
201 | HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, |
||
202 | TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig); |
||
203 | HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap); |
||
2 | mjames | 204 | /** |
205 | * @} |
||
206 | */ |
||
207 | |||
9 | mjames | 208 | /** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions |
209 | * @brief Extended Callbacks functions |
||
2 | mjames | 210 | * @{ |
211 | */ |
||
9 | mjames | 212 | /* Extended Callback **********************************************************/ |
213 | void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim); |
||
214 | void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim); |
||
2 | mjames | 215 | void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim); |
216 | /** |
||
217 | * @} |
||
218 | */ |
||
219 | |||
9 | mjames | 220 | /** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions |
221 | * @brief Extended Peripheral State functions |
||
2 | mjames | 222 | * @{ |
223 | */ |
||
9 | mjames | 224 | /* Extended Peripheral State functions ***************************************/ |
2 | mjames | 225 | HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim); |
9 | mjames | 226 | HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN); |
2 | mjames | 227 | /** |
228 | * @} |
||
229 | */ |
||
230 | |||
231 | /** |
||
232 | * @} |
||
9 | mjames | 233 | */ |
2 | mjames | 234 | /* End of exported functions -------------------------------------------------*/ |
235 | |||
236 | /* Private functions----------------------------------------------------------*/ |
||
9 | mjames | 237 | /** @addtogroup TIMEx_Private_Functions TIMEx Private Functions |
238 | * @{ |
||
239 | */ |
||
2 | mjames | 240 | void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma); |
9 | mjames | 241 | void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma); |
2 | mjames | 242 | /** |
9 | mjames | 243 | * @} |
244 | */ |
||
2 | mjames | 245 | /* End of private functions --------------------------------------------------*/ |
246 | |||
247 | /** |
||
248 | * @} |
||
9 | mjames | 249 | */ |
2 | mjames | 250 | |
251 | /** |
||
252 | * @} |
||
253 | */ |
||
9 | mjames | 254 | |
2 | mjames | 255 | #ifdef __cplusplus |
256 | } |
||
257 | #endif |
||
258 | |||
259 | |||
9 | mjames | 260 | #endif /* STM32F1xx_HAL_TIM_EX_H */ |
2 | mjames | 261 | |
262 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |