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.

谁能给解释一下电机的这一段程序啊 谢谢



#define NOISE_WINDOW_CNT_MACRO(v) \
if (v.CmtnDelay >= v.NWDelayThres) /* noise window is fixed Value*/ \
v.NoiseWindowMax = v.NWDelayThres - v.NWDelta; \
else /* noise window adjusted dynamically*/ \
v.NoiseWindowMax = v.CmtnDelay - v.NWDelta; \
\
v.NoiseWindowCounter += 1; \
\
if (v.NoiseWindowCounter == v.NoiseWindowMax) /* zc must occur max_noise_window times*/ \
{ \
v.ZcTrig = 0x00007FFF; /* Yes! Set trigger */ \
v.NoiseWindowCounter = 0; \
}