can1settxrxmode.c

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

C
38
字号
#include <ecan.h>

#ifdef _C1TXIF

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

void CAN1SetTXRXMode(unsigned int buffno, unsigned int config)
{  
    switch(buffno)
    {
    case 0:
    case 1:
      C1TR01CON = config;
      break;
    case 2:
    case 3: 
      C1TR23CON = config;
      break;
    case 4:
    case 5: 
      C1TR45CON = config;
      break;
    case 6:
    case 7: 
      C1TR67CON = config;
      break; 
    }
}

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

⌨️ 快捷键说明

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