configcnpullups.c

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

C
30
字号
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include <ports.h>

/***************************************************************************
Function Prototype : void ConfigCNPullups(long int config)
 
Include            : ports.h
 
Description        : This function configures the pull-up resistors 
                     for CN pins.
 
Arguments          : config - This is the 32-bit value for configuring 
                     pull-ups. The lower word is stored into CNPU1 register 
                     and next upper word is stored into CNPU2 register.
                     The upper 10 bits of CNPU2 register are unimplemented.
 
Return Value       : None
 
Remarks            : None
****************************************************************************/

void ConfigCNPullups(long int config)
{
    CNPU1 = (unsigned int)config;
    CNPU2 = (unsigned int)(config >> 16);
}
/* end of function ConfigCNPullups */

⌨️ 快捷键说明

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