pikapython/bsp/w806/Demo/tim/wm_hal_msp.c
2022-02-18 11:27:58 +08:00

21 lines
581 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "wm_hal.h"
void HAL_MspInit(void)
{
}
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
__HAL_RCC_TIM_CLK_ENABLE();
HAL_NVIC_SetPriority(TIM_IRQn, 0);
HAL_NVIC_EnableIRQ(TIM_IRQn);
}
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{
// 由于所有的TIM共用一个时钟和中断所以如果只用了一路TIM在DeInit时可以关闭时钟和中断但如果使用了多路TIM在某一路DeInit时如果
// 关闭时钟和中断会影响其他在运行的TIM
// __HAL_RCC_TIM_CLK_DISABLE();
// HAL_NVIC_DisableIRQ(TIM_IRQn);
}