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.

instaspin-foc实验例程的问题

Other Parts Discussed in Thread: MOTORWARE

    在InstaSPIN-FOC的例程中,发现一个特点,就是声明为void 的函数,都会在函数体中加入一个return,这样有什么特别的意义么?

比如

void PWM_setPeriodLoad(PWM_Handle pwmHandle, const PWM_PeriodLoad_e periodLoad)
{
PWM_Obj *pwm = (PWM_Obj *)pwmHandle;


// clear the bits
pwm->TBCTL &= (~PWM_TBCTL_PRDLD_BITS);

// set the bits
pwm->TBCTL |= periodLoad;

return;
}