__HAL_TIM_ENABLE_IT()
时间: 2023-09-18 07:06:22 浏览: 114
__HAL_TIM_ENABLE_IT() is a macro in the HAL (Hardware Abstraction Layer) library for STM32 microcontrollers. It is used to enable interrupts for a specific timer (TIM) in the microcontroller.
Syntax:
__HAL_TIM_ENABLE_IT(TIM_HandleTypeDef *htim, uint32_t interrupt)
Parameters:
- htim: Pointer to the TIM handle structure that contains the configuration information for the specified TIM.
- interrupt: Specifies the interrupt source to be enabled. This parameter can be one of the following values:
- TIM_IT_UPDATE: Enables the TIM update interrupt.
- TIM_IT_CC1: Enables the TIM capture/compare 1 interrupt.
- TIM_IT_CC2: Enables the TIM capture/compare 2 interrupt.
- TIM_IT_CC3: Enables the TIM capture/compare 3 interrupt.
- TIM_IT_CC4: Enables the TIM capture/compare 4 interrupt.
- TIM_IT_COM: Enables the TIM commutation interrupt.
- TIM_IT_TRIGGER: Enables the TIM trigger interrupt.
- TIM_IT_BREAK: Enables the TIM break interrupt.
Return value:
None
Example:
__HAL_TIM_ENABLE_IT(&htim1, TIM_IT_UPDATE); // Enables the TIM update interrupt for TIM1.
阅读全文
相关推荐
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)