47 lines
1.6 KiB
C
47 lines
1.6 KiB
C
/*************************************************************************************************
|
|
**Filename: app_timer.c
|
|
**Version :
|
|
**Author :
|
|
**Date :
|
|
**Description:
|
|
**
|
|
*************************************************************************************************/
|
|
#include "app_timer.h"
|
|
|
|
/*********************************************************************
|
|
* Extern Function declared ('extern')
|
|
*/
|
|
extern void Timer_2_callback(void);
|
|
/*************************************************************************************************
|
|
* Function Name:
|
|
* Description :
|
|
* Arguments :
|
|
* Return Value :
|
|
*************************************************************************************************/
|
|
void Timer_Config(void)
|
|
{
|
|
timer_2_disable(); //100ms¶¨Ê±ÈÎÎñ
|
|
}
|
|
/*************************************************************************************************
|
|
* Function Name:
|
|
* Description :
|
|
* Arguments :
|
|
* Return Value :
|
|
*************************************************************************************************/
|
|
void Timer2_Enable(void)
|
|
{
|
|
timer_2_enable(3276,Timer_2_callback); //100ms¶¨Ê±ÈÎÎñ
|
|
}
|
|
/*************************************************************************************************
|
|
* Function Name:
|
|
* Description :
|
|
* Arguments :
|
|
* Return Value :
|
|
*************************************************************************************************/
|
|
void Timer2_Disable(void)
|
|
{
|
|
timer_2_disable();
|
|
}
|
|
/*************************************************************************************************/
|
|
|