opencapture1.c

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

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

#ifdef _ICAP1
/*******************************************************************************
Function Prototype : void OpenCapture1(unsigned int config)
 
Include            : incap.h
 
Description        : This function configures the Input Capture module.
 
Arguments          : config - This contains the parameters to be configured in the
                     ICxCON register as defined below
					 Idle mode operation					
					   IC_IDLE_CON					
					   IC_IDLE_STOP					
					 Clock select					
					   IC_TIMER2_SRC					
					   IC_TIMER3_SRC					
					 Captures per interrupt					
					   IC_INT_4CAPTURE					
					   IC_INT_3CAPTURE					
					   IC_INT_2CAPTURE					
					   IC_INT_1CAPTURE					
					   IC_INTERRUPT   					
					 IC mode select	
					   IC_INTERRUPT				
					   IC_EVERY_16_RISE_EDGE					
					   IC_EVERY_4_RISE_EDGE					
					   IC_EVERY_RISE_EDGE					
					   IC_EVERY_FALL_EDGE
					   IC_EVERY_EDGE					
					   IC_INPUTCAP_OFF
 
Return Value       : None
 
Remarks            : This function configures the input capture for idle mode, clock select,
                      capture per interrupt and mode select
********************************************************************************/
void OpenCapture1(unsigned int config)
{
    /* Config contains Clock source, number of Captures per interuppt
                                    and Capture Mode */
    IC1CON = config;
}

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

⌨️ 快捷键说明

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