can2settxrxmode.c

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

C
38
字号
#include <ecan.h>

#ifdef _C2TXIF

/****************************************************************************
* Function Name     : CAN2SetTXRXMode
* Description       : This function configures the CxTRmnCON register
* Parameters        : unsigned int buffno, unsigned int config
* Return Value      : None 
*****************************************************************************/

void CAN2SetTXRXMode(unsigned int buffno, unsigned int config)
{  
    switch(buffno)
    {
    case 0:
    case 1:
      C2TR01CON = config;
      break;
    case 2:
    case 3: 
      C2TR23CON = config;
      break;
    case 4:
    case 5: 
      C2TR45CON = config;
      break;
    case 6:
    case 7: 
      C2TR67CON = config;
      break; 
    }
}

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

⌨️ 快捷键说明

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