SY/USER/Tim/Tim.h
2020-05-27 00:57:57 +08:00

29 lines
843 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.

#ifndef __TIM_H
#define __TIM_H
#include "stm32f10x.h"
/**-------------------------------------------------------
* @函数名 TIM2_INIT
* @功能 通用定时器2中断初始化
* @参数 arr:自动重装值。psc:时钟预分频数
* @返回值 无
***------------------------------------------------------*/
void TIM2_INIT(u16 arr,u16 psc);
/**-------------------------------------------------------
* @函数名 TIM2_IRQHandler
* @功能 定时器2中断服务程序
* @返回值 无
***------------------------------------------------------*/
void TIM2_IRQHandler(void) ; //TIM2中断
/**-------------------------------------------------------
* @函数名 TIM3_PWM_INIT
* @功能 TIM3 PWM部分初始化
* @参数 arr:自动重装值。psc:时钟预分频数
* @返回值 无
***------------------------------------------------------*/
void TIM3_PWM_INIT(u16 arr,u16 psc);
#endif