2.90.29 PWM_PhaseSelect Function

C

inline static void PWM_PhaseSelect(PWM_GENERATOR genNum,PWM_SOURCE_SELECT source)

Summary

This inline function selects the PWM generator source for Phase.

Description

This function sets the source of the PWM phase for the specified generator. It allows you to configure the generator's phase either Master Phase or generator phase itself.

Precondition

None

Parameters

ParamDescription
genNumPWM generator number
sourcePWM generator source select

Returns

None

Example

inline static void PWM_PhaseSelect(PWM_GENERATOR genNum,PWM_SOURCE_SELECT source)
{
    switch(genNum) { 
        case PWM_GENERATOR_1:
                PG1CONbits.MPHSEL = source;
                break;
        default:break;
    }
}

Remarks

None