can2isrxready.c

来自「Mplab C30编译器」· C语言 代码 · 共 25 行

C
25
字号
#include <ecan.h>

#ifdef _C2TXIF

/****************************************************************************
* Function Name     : CAN2IsRXReady
* Description       : This function returns RXFUL bit status which indicates 
*                     whether the receive buffer contains any received message
* Parameters        : unsigned int: buffno
* Return Value      : char:RXFUL bit status 
*****************************************************************************/

char CAN2IsRXReady(char buffno)
{  
    if (buffno < 16)
      return C2RXFUL1 & (1 << buffno);
    else if (buffno <= 31) 
      return C2RXFUL2 & (1 << (buffno - 16));
    else return 0;
}

#else
#warning "Does not build on this target"
#endif

⌨️ 快捷键说明

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