closetimer2.c
来自「Mplab C30编译器」· C语言 代码 · 共 33 行
C
33 行
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include <timer.h>
/****************************************************************************
Function Prototype : void CloseTimer2(void)
Include : timer.h
Description : This function turns off the 16-bit timer module.
Arguments : None
Return Value : None
Remarks : This function first disables the 16-bit timer interrupt
and then turns off the timer module. The Interrupt
Flag bit (TxIF) is also cleared.
****************************************************************************/
#ifdef _TIMER2
void CloseTimer2(void)
{
IEC0bits.T2IE = 0; /* Disable the Timer2 interrupt */
T2CONbits.TON = 0; /* Disable timer2 */
IFS0bits.T2IF = 0; /* Clear Timer interrupt flag */
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?