⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 closetimer2.c

📁 Mplab C30编译器
💻 C
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -