closeqei.c

来自「Microchip的官方PIC24H系列16位单片机的外设源程序库。」· C语言 代码 · 共 24 行

C
24
字号
#include <qei.h>
#include <p30fxxxx.h>

/* QEI is defined in following devices */
#if defined(__dsPIC30F2010__) || defined(__dsPIC30F3010__) || defined(__dsPIC30F4012__) || \
    defined(__dsPIC30F3011__) || defined(__dsPIC30F4011__) || defined(__dsPIC30F6010__) || \
    defined(__dsPIC30F5015__)

/**************************************************************************
* Function Name     : CloseQEI()
* Description       : This routine disables the QEI and its interrupt bits. 
* Parameters        : None
* Return Value      : None
***************************************************************************/

void CloseQEI(void)
{
    IEC2bits.QEIIE = 0;     /* disable interrupt */
    QEICONbits.QEIM = 0x0;  /* QEI/Timer off */  
    IFS2bits.QEIIF = 0;     /* clear IF flag */       
}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?