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.

Query related deadband setting

In these functions why using oring (|= delay) with delay variable. It will always added if I am changing dead band time after initialization.

void PWM_setDeadBandRisingEdgeDelay(PWM_Handle pwmHandle,const uint_least8_t delay)

{

PWM_Obj *pwm = (PWM_Obj *)pwmHandle;

pwm->DBRED |= delay;

return;

} // end of PWM_setDeadBandRisingEdgeDelay() function

void PWM_setDeadBandFallingEdgeDelay(PWM_Handle pwmHandle,const uint_least8_t delay)

{

PWM_Obj *pwm = (PWM_Obj *)pwmHandle;

pwm->DBFED |= delay;

return;

} // end of PWM_setDeadBandFallingEdgeDelay() function

I think it should be only pwm->DBRED = delay, and pwm->DBFED = delay;