216 lines
8.4 KiB
C
216 lines
8.4 KiB
C
|
#include "timer.h"
|
|||
|
#include "stm32f10x.h"
|
|||
|
#include "stm32f10x_rcc.h"
|
|||
|
#include "misc.h"
|
|||
|
#include "sysport.h"
|
|||
|
|
|||
|
/********************************************************************************
|
|||
|
* @file timer.c
|
|||
|
* @author <EFBFBD>̳ϿƼ<EFBFBD> Mr.Wang
|
|||
|
* @version V1.0.0
|
|||
|
* @date 11-Dec-2018
|
|||
|
* @brief stm32Ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
******************************************************************************
|
|||
|
* @ע<EFBFBD>⣺ <EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD>ʱ<EFBFBD><EFBFBD>ΧΪ0.1S~65S,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD><EFBFBD>ߵĶ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|||
|
* ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD>Timerx_Init<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еķ<EFBFBD>Ƶϵ<EFBFBD><EFBFBD>
|
|||
|
*******************************************************************************/
|
|||
|
|
|||
|
/****************************************************************************
|
|||
|
* TIMER<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
****************************************************************************/
|
|||
|
TIM_TypeDef * TIMx_TIMER[TIMERSUM] = {TIM2, TIM3, TIM4, TIM5, TIM6, TIM7} ; //(TIM_TypeDef *)<29><><EFBFBD>͵<EFBFBD><CDB5><EFBFBD><EFBFBD>ݣ<EFBFBD>ӳ<EFBFBD><D3B3>timer2~timer7
|
|||
|
const uint32_t TIMx_RCC[TIMERSUM] = {RCC_APB1Periph_TIM2,
|
|||
|
RCC_APB1Periph_TIM3,
|
|||
|
RCC_APB1Periph_TIM4,
|
|||
|
RCC_APB1Periph_TIM5,
|
|||
|
RCC_APB1Periph_TIM6,
|
|||
|
RCC_APB1Periph_TIM7} ; //timer2~timer7<72><37>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
const uint8_t TIMx_IRQ[TIMERSUM] = {TIM2_IRQn, TIM3_IRQn, TIM4_IRQn, TIM5_IRQn, TIM6_IRQn, TIM7_IRQn} ;//timer2~timer7<72><37><EFBFBD>ж<EFBFBD><D0B6><EFBFBD>
|
|||
|
|
|||
|
/*****************************************
|
|||
|
*<EFBFBD>ж<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
****************************************/
|
|||
|
TIMERFP timerFp[TIMERSUM] = {NULL} ; //TIM2~TIM7 <20><><EFBFBD><EFBFBD>6<EFBFBD><36>TIMER<45>ж<EFBFBD><D0B6>߶<EFBFBD>Ӧ<EFBFBD>Ļص<C4BB><D8B5><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
|
|||
|
|
|||
|
/**************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ƣ<EFBFBD>TIMERFP Timer_RegHookCallback(TIMER_e eTIMERn, TIMERFP pCallback)
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Timer<EFBFBD>жϻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-ע<EFBFBD>ắ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Timer<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>TIMERFP<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>timerFp6<EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* Timer_RegHookCallback<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD>ioFpָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param1 pCallback<EFBFBD><EFBFBD> TIMERFP<EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
|
|||
|
* @param2 eTIMERn TIMER_eö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param1 pCallback TIMER_e<EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*************************************************************************************************/
|
|||
|
TIMERFP Timer_RegHookCallback(TIMER_e eTIMERn, TIMERFP pCallback)
|
|||
|
{
|
|||
|
if( timerFp[eTIMERn] == NULL )
|
|||
|
timerFp[eTIMERn] = pCallback ;
|
|||
|
else
|
|||
|
SysErr("") ; //Timer Callback repeat reg!
|
|||
|
return pCallback ;
|
|||
|
}
|
|||
|
|
|||
|
/**************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ƣ<EFBFBD>void Timer_Hook(TIMER_e eTIMERn)
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Timer<EFBFBD>ж<EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD>õĹ<EFBFBD><EFBFBD>Ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>е<EFBFBD><EFBFBD>жϻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>Ļص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD>ٺٺ١<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>eTIMERn<EFBFBD>Ṵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD>Ļص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>timerFp[TIMERSUM]<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param2 eTIMERn TIMER_eö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*************************************************************************************************/
|
|||
|
void Timer_Hook(TIMER_e eTIMERn)
|
|||
|
{
|
|||
|
if( timerFp[eTIMERn] != NULL )
|
|||
|
{
|
|||
|
timerFp[eTIMERn]() ;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/**************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ƣ<EFBFBD> void Timerx_Init(TIMER_e eTIMERn, u16 timeMs, IntPriority_e ePriority, FunctionalState NewState)
|
|||
|
* <EFBFBD>ⲿ<EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD> ErrorLogPrintf
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ܣ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param1 eTIMERn <EFBFBD>˿<EFBFBD>
|
|||
|
* @arg TIMER_e ö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param2 timeMs <EFBFBD><EFBFBD>ʱʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λms
|
|||
|
* @param3 ePriority IntPriority_eö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><EFBFBD><EFBFBD>ʾIO<EFBFBD>˿<EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>
|
|||
|
* @param4 NewState: <EFBFBD>Ƿ<EFBFBD>ʹ<EFBFBD>ܶ<EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
* @arg ENABLE :<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
* @arg DISABLE :<EFBFBD>رն<EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
* ˵ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>Ϊ72M<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶϵ<EFBFBD><EFBFBD>Ϊ64799<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>Ϊ72M/(64799+1)<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD>ΪTimerPeriod<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD>ô<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:(TimerPeriod+1)/(72M/((7200-1)+1))S
|
|||
|
* T = (TimerPeriod+1)*((7200-1)+1)/72000 MS = (TimerPeriod+1)*0.1 MS
|
|||
|
* Tmax = (65536+1)*0.1 = 6553 MS
|
|||
|
************************************************************************************************************/
|
|||
|
void Timerx_Init(TIMER_e eTIMERn, u16 timeMs, IntPriority_e ePriority, FunctionalState NewState)
|
|||
|
{
|
|||
|
if( timeMs > 6553 )
|
|||
|
{
|
|||
|
timeMs = 6553 ;
|
|||
|
SysErr("") ;
|
|||
|
}
|
|||
|
RCC_APB1PeriphClockCmd(TIMx_RCC[eTIMERn], ENABLE) ;
|
|||
|
|
|||
|
NVIC_InitTypeDef NVIC_InitStructure ;
|
|||
|
NVIC_InitStructure.NVIC_IRQChannel = TIMx_IRQ[eTIMERn];
|
|||
|
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = ePriority; //<2F><>ռ<EFBFBD><D5BC><EFBFBD>ȼ<EFBFBD>preemptionPriority
|
|||
|
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>0
|
|||
|
NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE; //ʧ<><CAA7>
|
|||
|
NVIC_Init(&NVIC_InitStructure);
|
|||
|
|
|||
|
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure ;
|
|||
|
TIM_TimeBaseStructure.TIM_Prescaler = (7200-1) ; //Ԥ<><D4A4>Ƶϵ<C6B5><CFB5>Ϊ7200-1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Ϊ72MHz/7200 = 10kHz
|
|||
|
TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1 ; //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD>ӷָ<D3B7> TIM_CKD_DIV1=0x0000,<2C><><EFBFBD>ָ<EFBFBD>
|
|||
|
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up ; //<2F><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD>ģʽΪ<CABD><CEAA><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ģʽ
|
|||
|
TIM_TimeBaseStructure.TIM_Period = timeMs/0.1-1 ; //<2F><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ65536,<2C><>
|
|||
|
TIM_TimeBaseStructure.TIM_RepetitionCounter = 0;
|
|||
|
TIM_TimeBaseInit(TIMx_TIMER[eTIMERn],&TIM_TimeBaseStructure); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>õ<EFBFBD>TIM7<4D><37>
|
|||
|
//TIM_UpdateRequestConfig( TIMx_TIMER[eTIMERn], TIM_UpdateSource_Regular);
|
|||
|
TIM_ITConfig(TIMx_TIMER[eTIMERn], TIM_IT_Update,ENABLE); //ʹ<><CAB9><EFBFBD>ж<EFBFBD>
|
|||
|
TIM_Cmd(TIMx_TIMER[eTIMERn], NewState);
|
|||
|
TIM_ClearITPendingBit(TIMx_TIMER[eTIMERn] , TIM_FLAG_Update) ;//ʹ<>ܶ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ж<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϱ<D0B6>־λ
|
|||
|
NVIC_EnableIRQ(TIMx_IRQ[eTIMERn]) ;
|
|||
|
}
|
|||
|
|
|||
|
/**************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ƣ<EFBFBD> void Timerx_Reset(TIMER_e eTIMERn)
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ܣ<EFBFBD> <EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>eTIMERn<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param eTIMERn <EFBFBD>˿<EFBFBD>
|
|||
|
* @arg TIMER_eö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
***************************************************************************************************/
|
|||
|
void Timerx_Reset(TIMER_e eTIMERn)
|
|||
|
{
|
|||
|
TIM_SetCounter( TIMx_TIMER[eTIMERn], 0x0000 ) ; //TIM7<4D><37><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
|
|||
|
}
|
|||
|
|
|||
|
/**************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ƣ<EFBFBD> void Timerx_Open(TIMER_e eTIMERn)
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ܣ<EFBFBD> <EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>eTIMERn,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param eTIMERn <EFBFBD>˿<EFBFBD>
|
|||
|
* @arg TIMER_eö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
***************************************************************************************************/
|
|||
|
void Timerx_Open(TIMER_e eTIMERn)
|
|||
|
{
|
|||
|
TIM_SetCounter( TIMx_TIMER[eTIMERn], 0x0000 ) ; //TIM7<4D><37><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
|
|||
|
TIM_Cmd(TIMx_TIMER[eTIMERn], ENABLE);
|
|||
|
}
|
|||
|
|
|||
|
/**************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ƣ<EFBFBD> void Timerx_Close(TIMER_e eTIMERn)
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD>ܣ<EFBFBD> <EFBFBD>رն<EFBFBD>ʱ<EFBFBD><EFBFBD>eTIMERn
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param eTIMERn <EFBFBD>˿<EFBFBD>
|
|||
|
* @arg TIMER_eö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
************************************************************************************************************/
|
|||
|
void Timerx_Close(TIMER_e eTIMERn)
|
|||
|
{
|
|||
|
TIM_Cmd(TIMx_TIMER[eTIMERn], DISABLE) ;
|
|||
|
//TIM_SetCounter( TIM6,0x0000 ) ;
|
|||
|
}
|
|||
|
|
|||
|
void TIM2_IRQHandler(void)
|
|||
|
{
|
|||
|
if(TIM_GetITStatus(TIM2, TIM_IT_Update)== SET)
|
|||
|
{
|
|||
|
TIM_ClearITPendingBit(TIM2 , TIM_FLAG_Update) ;
|
|||
|
SysLog("TIM2_IRQ!") ;
|
|||
|
Timer_Hook(TIMER2) ; //Timer2<72>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void TIM3_IRQHandler(void)
|
|||
|
{
|
|||
|
if(TIM_GetITStatus(TIM3, TIM_IT_Update)== SET)
|
|||
|
{
|
|||
|
TIM_ClearITPendingBit(TIM3 , TIM_FLAG_Update) ;
|
|||
|
SysLog("TIM3_IRQ!") ;
|
|||
|
Timer_Hook(TIMER3) ; //Timer3<72>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void TIM4_IRQHandler(void)
|
|||
|
{
|
|||
|
if(TIM_GetITStatus(TIM4, TIM_IT_Update)== SET)
|
|||
|
{
|
|||
|
TIM_ClearITPendingBit(TIM4 , TIM_FLAG_Update) ;
|
|||
|
SysLog("TIM4_IRQ!") ;
|
|||
|
Timer_Hook(TIMER4) ; //Timer4<72>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void TIM5_IRQHandler(void)
|
|||
|
{
|
|||
|
if(TIM_GetITStatus(TIM5, TIM_IT_Update)== SET)
|
|||
|
{
|
|||
|
TIM_ClearITPendingBit(TIM5 , TIM_FLAG_Update) ;
|
|||
|
SysLog("TIM5_IRQ!") ;
|
|||
|
Timer_Hook(TIMER5) ; //Timer5<72>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void TIM6_IRQHandler(void)
|
|||
|
{
|
|||
|
if(TIM_GetITStatus(TIM6, TIM_IT_Update)== SET)
|
|||
|
{
|
|||
|
TIM_ClearITPendingBit(TIM6 , TIM_FLAG_Update) ;
|
|||
|
SysLog("TIM6_IRQ!") ;
|
|||
|
Timer_Hook(TIMER6) ; //Timer6<72>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void TIM7_IRQHandler(void)
|
|||
|
{
|
|||
|
if(TIM_GetITStatus(TIM7, TIM_IT_Update)== SET)
|
|||
|
{
|
|||
|
TIM_ClearITPendingBit(TIM7 , TIM_FLAG_Update) ;
|
|||
|
Timer_Hook(TIMER7) ;
|
|||
|
}
|
|||
|
}
|
|||
|
|