This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28027例程ECAP_capture_pwm中的问题

事件的中断函数interrupt void ecap1_isr(void)中

有这样几行代码

if(CAP_getCap2(myCap) > PWM_getPeriod(myPwm)*2+1 || CAP_getCap2(myCap) < PWM_getPeriod(myPwm)*2-1)
    {
       Fail();
    }

    if(CAP_getCap3(myCap) > PWM_getPeriod(myPwm)*2+1 || CAP_getCap3(myCap) < PWM_getPeriod(myPwm)*2-1)
    {
        Fail();
    }

    if(CAP_getCap4(myCap) > PWM_getPeriod(myPwm)*2+1 || CAP_getCap4(myCap) < PWM_getPeriod(myPwm)*2-1)
    {
       Fail();
    }

请问:

①CAP_getCapx()函数是什么意思,是获得哪一个参数

②为什么要判断不是它的两倍值

③为什么要让它进入fail()

④为什么没对CAP1进行判断