cantata
stm32f1xx_hal_tim_ex.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F1xx_HAL_TIM_EX_H
22 #define STM32F1xx_HAL_TIM_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f1xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
48 typedef struct
49 {
50  uint32_t IC1Polarity;
53  uint32_t IC1Prescaler;
56  uint32_t IC1Filter;
59  uint32_t Commutation_Delay;
65 /* End of exported types -----------------------------------------------------*/
66 
67 /* Exported constants --------------------------------------------------------*/
82 /* End of exported constants -------------------------------------------------*/
83 
84 /* Exported macro ------------------------------------------------------------*/
92 /* End of exported macro -----------------------------------------------------*/
93 
94 /* Private macro -------------------------------------------------------------*/
102 /* End of private macro ------------------------------------------------------*/
103 
104 /* Exported functions --------------------------------------------------------*/
113 /* Timer Hall Sensor functions **********************************************/
114 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig);
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 
120 /* Blocking mode: Polling */
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);
137 /* Timer Complementary Output Compare functions *****************************/
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);
157 /* Timer Complementary PWM functions ****************************************/
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);
176 /* Timer Complementary One Pulse functions **********************************/
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);
192 /* Extended Control functions ************************************************/
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);
212 /* Extended Callback **********************************************************/
213 void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim);
214 void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim);
215 void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
224 /* Extended Peripheral State functions ***************************************/
225 HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim);
226 HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN);
234 /* End of exported functions -------------------------------------------------*/
235 
236 /* Private functions----------------------------------------------------------*/
240 void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
241 void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma);
245 /* End of private functions --------------------------------------------------*/
246 
255 #ifdef __cplusplus
256 }
257 #endif
258 
259 
260 #endif /* STM32F1xx_HAL_TIM_EX_H */
261 
262 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
This file contains HAL common defines, enumeration, macros and structures definitions.
uint32_t Commutation_Delay
Definition: stm32f1xx_hal_tim_ex.h:59
DMA handle Structure definition.
Definition: stm32f1xx_hal_dma.h:111
uint32_t IC1Prescaler
Definition: stm32f1xx_hal_tim_ex.h:53
uint32_t IC1Filter
Definition: stm32f1xx_hal_tim_ex.h:56
HAL_TIM_StateTypeDef
HAL State structures definition.
Definition: stm32f1xx_hal_tim.h:288
uint32_t IC1Polarity
Definition: stm32f1xx_hal_tim_ex.h:50
TIM Time Base Handle Structure definition.
Definition: stm32f1xx_hal_tim.h:335
TIM Master configuration Structure definition.
Definition: stm32f1xx_hal_tim.h:229
HAL_TIM_ChannelStateTypeDef
TIM Channel States definition.
Definition: stm32f1xx_hal_tim.h:300
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32f1xx_hal_def.h:39
TIM Hall sensor Configuration Structure definition.
Definition: stm32f1xx_hal_tim_ex.h:48
TIM Break input(s) and Dead time configuration Structure definition.
Definition: stm32f1xx_hal_tim.h:265